Jump to content

scripting help


crazysk8er59
 Share

Recommended Posts

I'm assuming you're talking about Geneforge 3. If you're not, I deny and can prove that I am not responsible for any broken games. If it's Geneforge 3 and your game still breaks, it's still not my fault because this is technically just friendly advice.

 

Placing an item on a space isn't worth the trouble; I'm not even sure it's possible. Placing an item in a pack, however, is good if you need a certain random quest item or you just want an overpowered character. However, you should probably make, to be safe,

 

1) A backup of the save file for the character to whom you will give an item

2) A backup of the edited script before it was edited

3) A backup of your game if, for some reason, you messed things up so badly that you just want to start anew

 

Okay. So. First you'll want to get at what are called "scripts". These contain most of the text and non-engine calculations in the game. On Windows, the directory is C:\Program Files\Geneforge 3\Data\Scripts. They should be opened with as basic of a text editor as you can find; double-clicking will probably open them in a format which will not cause any trouble, though.

 

The way that you decide which one to open will be to find out at what point or zone in the game you want to recieve an item. The scripts should be listed by island, although you might not notice as they have funny names. The scripts you want to edit will have names like "zXYnickname"; the "z" should be there to signify that it is the script for a zone, the "X" and "Y" identify which zone, and "nickname" will usually be a shortened version of the zone's actual name. Don't yet open something with a "dlg" at the end; those are more complicated.

 

Once you're reading the actual script with a text editor, you'll see things like "beginzonescript" and "beginstate". Don't put anything in the "beginzonescript" space; only very special things go in there. Instead, just start reading the dialog (the things that sound like they might be displayed in the game, e.g. "You step into the room and are immediately assaulted by a smelly man", not the things like "get_ran" or "set_aggression"). Once you recognize the text and can figure out where in the game you'll see it, you're ready to give yourself an item. Take note of the title of the text file and the state (you can tell which state it is by the "beginstate X" header which is justified almost all the way to the left).

 

In the space between each "beginstate" and the following "break", everything which is written will be run by the game. That doesn't mean you'll necessarily be given any indication, but it will. So make a new, blank line in the state you're changing and directly below the "beginstate"; use the tab key to indent exactly once, and then write in your code.

 

The code is "reward_give(x);". The "x" signifies the number of the item. For a full list of all items, see here . Make sure you include the ";" at the end of the line, there are no spaces, and that the line you just created and the next are separated (usually by pressing "Enter" or "Return"). Don't paste in "reward_give(x);" itself; fill in the "x" with the number of the item you want to give yourself.

 

Then start up the game. Find in the game the place where you saw your selected dialog. Trigger the dialog. You should get a single item of the type you entered. If you run the dialog more than once, you should get the item more than once.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...