Author Topic: Step by step to create a simple mission ?  (Read 2902 times)

Tchey

  • Full Member
  • ***
  • Posts: 140
    • View Profile
Step by step to create a simple mission ?
« on: September 07, 2014, 02:16:19 am »
Hi, i would like to create a campaign, but i know nothing about modding, so i must start with something small, like a single simple mission. I have no idea where to start, how to start, what to do, etc. I've read a little the wiki but i don't understand much. I've never modded a game before, i want to learn, but i need the very first steps to be explain clearly.

Hammish

  • Sr. Member
  • ****
  • Posts: 350
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #1 on: September 07, 2014, 03:16:25 am »
Actually, the best advice I can give ya here is to -not- get clear directions.  The way I learned it was by just leaping in and exploring the files, tinkering with things, and seeing how they worked and what they did.  It's a learning process. :)

For the very basics, though, to do quests and the like you'll want to snag core.cpk and extract it using an unzip program.  This will leave you with two folders, data and content.  Data is where all the numbers and scripts for the game are stored, like weapon damage, gear for ships, that kinda thing.  Content is all of the audio/visual effects for the game such as the 3D models, textures for them, sprites for weapon shots, sounds, ect.  For quests and a campaign you will therefore want the Data folder, then the Topics folder.  This has all the files pertaining to conversations you have with people (and thus, the quests they give).  This is also where I'd start to get your hands dirty; for instance, look at files for generic_quest_begin_tutorial; these are the files that handle the first quest Joe gives you.

The Javascript file in particular handles all his various quests and branching sections of conversation that he offers, and gives you a point of reference: you've done the tutorial quest before, probably quite a few times.  You know how the talk goes... so when you look at the JS file, you can say to yourself 'ah, yeah, I remember that from in the game, I guess this is how they do that'.  Just reading through that one file will be more tutorial than just about anyone here could give you, I think, because it demonstrates things like:
  • How to set up multiple inputs so as to give the player a choice between replies;
  • How to spawn objects in the game world, like Scurvy's ship;
  • How to give items to the player, or take them away;
  • How to use the State setting to set up multi-part missions.
Honestly, if you don't know JavaScript... you don't really even have to, unless you want to get into the more advanced pieces of modding.  Just look at what's already there and make use of it for your own ends.  It's like building with Legos; the best Lego creations are made using mostly standard 2x4 bricks that everyone in the world knows like the back of their hand.  It's all about how you combine them in awesome ways.  And the best way to start playing with Legos is to tear some stuff apart to get the pieces you need before you put it back together the way YOU want.  :D

FlessenGreendart

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #2 on: September 07, 2014, 07:44:06 am »
I second what Hammish is saying.
Just tweak things to begin with, she what does what, and see if it breaks the game (that's inevitable).

The trick is not to be scared to mess around!
Worst case scenario, you'll have to re-download the core files (easily done with the Game Launcher).

Tchey

  • Full Member
  • ***
  • Posts: 140
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #3 on: September 07, 2014, 10:12:50 am »
Quote
For the very basics, though, to do quests and the like you'll want to snag core.cpk and extract it using an unzip program.  This will leave you with two folders, data and content.  Data is where all the numbers and scripts for the game are stored, like weapon damage, gear for ships, that kinda thing.  Content is all of the audio/visual effects for the game such as the 3D models, textures for them, sprites for weapon shots, sounds, ect.  For quests and a campaign you will therefore want the Data folder, then the Topics folder.  This has all the files pertaining to conversations you have with people (and thus, the quests they give).  This is also where I'd start to get your hands dirty; for instance, look at files for generic_quest_begin_tutorial; these are the files that handle the first quest Joe gives you.

That part is exactly what i was looking for, thanks. I'm not sure i will do anything, but still i could see a few things and understand some basic mechanics, so it's good.

Hammish

  • Sr. Member
  • ****
  • Posts: 350
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #4 on: September 07, 2014, 10:27:43 am »
Oh, another huge suggestion I could add as a debugging tool:

In your VE folder, you will see a folder named Server_dotNET.  Inside is the .exe used to actually establish a game server when you play VE; even when you're playing single-player it still establishes a server on your machine temporarily and plays on that without granting it outside access.  For debugging I found it incredibly handy to create a shortcut to this server executable, then gave it the singleplayer attribute to make it run more speedily.  As a result, the shortcut on my machine looks like this:

"C:\Games\AtomicTorch\AtomicTorch GameLauncher\Games\VoidExpanse\Server_dotNET\AtomicTorch.SpaceRPG.Server.RuntimeWin.exe" --singleplayer

What this allows me to do is make changes, zip them into a .MPK, move the new version into my mods folder, and then just run the above.  It'll start the game server in a dosbox without starting the main game (which takes a fair bit longer to load up and the like) and if you have any errors in your data file it'll pick them up when it attempts to parse all the .XML and .JS files and tell you right in server box.  It'll even give you the line number where it picks up the issue, making it easy to correct whatever I messed up.  (Which 99% of the time was something stupid and bad of me, like copying an item and forgetting to give the new one a unique ID, heh.)

Anyone, maybe that'll help a little more as well. :)

FlessenGreendart

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #5 on: September 07, 2014, 11:40:47 am »
That's actually really helpful for me too!
Especially if I do something like mistype the texture names, and the xml is looking for something that doesn't exist!

Hammish

  • Sr. Member
  • ****
  • Posts: 350
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #6 on: September 07, 2014, 02:07:44 pm »
Yah, the only real downside is that after listing the errors the box will close, so you either need to modify windows to keep it open regardless or just do what I do and grab a quick screep capture of the window with the errors, then go over each one.

Lurler

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1022
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #7 on: September 07, 2014, 11:43:53 pm »
Great help! I will "sticky" the topic. I am sure a lot of people will find it useful.

Hammish

  • Sr. Member
  • ****
  • Posts: 350
    • View Profile
Re: Step by step to create a simple mission ?
« Reply #8 on: September 08, 2014, 01:31:22 am »
More stuff to be added to the wiki, too, I reckon.  Eventually.  Really wish my day job wasn't kickin' my ass right now.