Add Item with Script?
Author | Topic: Add Item with Script? |
---|---|
Infiltrator
Member # 5785
|
written Friday, July 15 2005 08:03
Profile
Even though many have posted about this before, I have never truely undestood how you do it. I have never had a reason to do it, but now I do. I have misplaced an item (Putrefied Gauntlets), and I want to it back. How do I add it? I got the Item code (Someone posted it before on the board) -------------------- "..The seventh wave of Thrall stumbled and climbed over the slippery, piled dead and Mazzarin saw The Watcher with them and at last knew the number of his days." Posts: 522 | Registered: Wednesday, May 4 2005 07:00 |
Apprentice
Member # 5980
|
written Friday, July 15 2005 08:19
Profile
Homepage
You need to use the function "give_reward(num)" where num is the code of the item (in the case of your gloves 345) All you need to do is to ad "reward_give(345);" in a dialogue script (in the "code=" section). -------------------- [My homepage] - [The Reasoned Character Editor] - [NOSE(Gf3 version)] - [NOSE(Gf2 version)] Posts: 45 | Registered: Saturday, June 18 2005 07:00 |
Infiltrator
Member # 5785
|
written Friday, July 15 2005 08:26
Profile
Can I type give_reward345 in the Shift+D box, or is there somewhere else? -------------------- "..The seventh wave of Thrall stumbled and climbed over the slippery, piled dead and Mazzarin saw The Watcher with them and at last knew the number of his days." Posts: 522 | Registered: Wednesday, May 4 2005 07:00 |
Apprentice
Member # 5980
|
written Friday, July 15 2005 08:32
Profile
Homepage
I'm not very informed about the cheat codes :-/ I was talking of the scripts... in which zone are you precisely? -------------------- [My homepage] - [The Reasoned Character Editor] - [NOSE(Gf3 version)] - [NOSE(Gf2 version)] Posts: 45 | Registered: Saturday, June 18 2005 07:00 |
Infiltrator
Member # 5785
|
written Friday, July 15 2005 08:53
Profile
Fort Wilton. Which program do I need to open the script with? -------------------- "..The seventh wave of Thrall stumbled and climbed over the slippery, piled dead and Mazzarin saw The Watcher with them and at last knew the number of his days." Posts: 522 | Registered: Wednesday, May 4 2005 07:00 |
Triad Mage
Member # 7
|
written Friday, July 15 2005 09:04
Profile
Homepage
You need a text editor like TextEdit or NotePad or something. -------------------- "At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander ==== Drakefyre's Demesne - Happy Happy Joy Joy Encyclopedia Ermariana - Trapped in the Closet ==== You can take my Mac when you pry my cold, dead fingers off the mouse! Posts: 9436 | Registered: Wednesday, September 19 2001 07:00 |
Infiltrator
Member # 5785
|
written Friday, July 15 2005 09:23
Profile
I got that (NotePad), and I found the script, I am just really unsure where to write anything. I don't want to emss anything up. More detailed help, please? -------------------- "..The seventh wave of Thrall stumbled and climbed over the slippery, piled dead and Mazzarin saw The Watcher with them and at last knew the number of his days." Posts: 522 | Registered: Wednesday, May 4 2005 07:00 |
Shaper
Member # 5437
|
written Friday, July 15 2005 18:27
Profile
There are a few places you could put reward_give(). Here's how to put it into a talknode… A less complicated talknode… Edit: fix [ Friday, July 15, 2005 18:40: Message edited by: Dolphin. ] Posts: 2032 | Registered: Wednesday, January 26 2005 08:00 |
Apprentice
Member # 5980
|
written Friday, July 15 2005 21:57
Profile
Homepage
For example you could open z33fortwiltdlg.txt and change this: Into this: Then you'll just have to click on the sign that usually says "LONG TERM STORAGE" to get your gloves. -------------------- [My homepage] - [The Reasoned Character Editor] - [NOSE(Gf3 version)] - [NOSE(Gf2 version)] Posts: 45 | Registered: Saturday, June 18 2005 07:00 |
Infiltrator
Member # 5785
|
written Saturday, July 16 2005 03:11
Profile
It's not working. I have having a MAJOR issue trying to figure out where to put all the spaceing, and when to press enter for the next line, since either you guys have added that (Because it looks like this for me): begintalknode 10; state = -1; nextstate = -1; condition = 1; question = "special"; text1 = "The sign says:"; text2 = " LONG TERM STORAGE!"; text3 = " Stay out! Alarms are in place!"; or the forum have scrambled it up. I tried just adding the words, but apparently any single space error makes the game flipp out, and it's sometimes hard to see if there should be "Code=" or "Code =" and how many spaces I am to put on the line under that, so that the "o" in the second "code" fits in right under the "=" in the first "code" (As you have posted it.) Edit: I solved the issue myself with some constructive thinking. I used the tab key, and added a code command and a break command, so that it looks like this: begintalknode 10; state = -1; nextstate = -1; condition = 1; question = "special"; text1 = "The sign says:"; text2 = " LONG TERM STORAGE!"; text3 = " Stay out! Alarms are in place!"; code = reward_give(345); break; Why I would need a first "code" that said nothing beats me. Perhaps you just typed that out wrong? And perhaps your TextEdit or the way you copy make the script look curved and with strange spaceings, while it is actually just straight (as I copied.) [ Saturday, July 16, 2005 03:18: Message edited by: Contra ] -------------------- "..The seventh wave of Thrall stumbled and climbed over the slippery, piled dead and Mazzarin saw The Watcher with them and at last knew the number of his days." Posts: 522 | Registered: Wednesday, May 4 2005 07:00 |
...b10010b...
Member # 869
|
written Saturday, July 16 2005 03:35
Profile
Homepage
The original scripts do have indentations (the "strange spacings" at the start of the line). They're not important for the function of the script, but they make it easier to read. It's probable that whatever text editor you're opening the scripts in is ignoring the indentation for some reason. [ Saturday, July 16, 2005 03:38: Message edited by: Thuryl ] -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Apprentice
Member # 5980
|
written Saturday, July 16 2005 04:02
Profile
Homepage
quote:It's not exactly like this ;) The scripting language used in the Geneforge series requires to end commands with a ; This means that code = give_reward(345); break; is the same as code = give_reward(345); break; Just think that code means that some sort of script must be executed and break means that the scripting has ended. -------------------- [My homepage] - [The Reasoned Character Editor] - [NOSE(Gf3 version)] - [NOSE(Gf2 version)] Posts: 45 | Registered: Saturday, June 18 2005 07:00 |