Jump to content


Scripting and modding GF5

Geneforge GF modding mod editor script

  • Please log in to reply
132 replies to this topic
alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 04 January 2017 - 02:37 AM #1 Scripting and modding GF5

I decided to start this thread to share scripting advice with similar minded people so that we don't have to reinvent the wheel every time.

Quote

Edit: alhoon, you talked about the total number for each character. How do you find that? Do you just test every number possible until you find it? Or did you use some other way to do it? I'm not exactly sure how the total number thing works exactly...
Using "exhaustive search" technique and this trick:

In a dialog script (signposts are nice), put this temporary script (Remember to remove it after testing!):

code =
  num=10; // It can be whatever number you want from the creatures in the zone
   // you can see the numbers if you use the editor.
  add_char_to_party(num);

  temp=1;
  while (temp<3005) {
   if (char_in_party(temp) > 0) {
change_coins(temp);
}
   temp=temp+1;
   }
break;

You talk to the signpost, creature 10 is added to your party (if spawned) and then you see its number from the coins you gained.
I don't know how good you're in scripting, so I'll add this:
At the beginning of the zone dialogue txt, you should have:

// dlg.txt

begintalkscript;

variables;

short num;
short temp;


MY PROBLEM: And that's a big one, so please help. Not all creatures seem to have a "total" number! After ~20 hours of work I can't find the number for the mages in the bone peaks. :( I can do some stuff to circumvent it and not lose a whole quest chain, but it would be far simpler and more efficient if I could find, or generate, some identifier for them to see if they're in party.
Else if I put a flag when they're recruited and then they die or are dismissed, the events will keep happening...
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Refugees from Menzoberranzan Refugees from Menzoberranzan

The Demon of Good Taste

  • Global Moderator
    • Member ID: 223
  • 13,701 posts

Posted 04 January 2017 - 10:31 AM #2 Scripting and modding GF5

I'm not sure if I understand what you are trying to do, but I would suggest you do not cut off the search at 3005, but go higher, as there are definitely IDs above 3000.
"I, for one, prefer to believe that the forums are dead and that Lilith, Slarty, and I are all ghosts haunting the forum." -- Triumph

"I think we all have days where we feel like a Displacer Iguana." -- Slarty

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 04 January 2017 - 12:31 PM #3 Scripting and modding GF5

There are, but if I put 15000, I get a message that my script is trying to do too much. Actually, I usually go 1000, not 3000. i.e. 0-1000, 1001-2000, etc.

Also, Z60, starts at about 1150... so I took a guess that the mages would be up to 15000 or something.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Refugees from Menzoberranzan Refugees from Menzoberranzan

The Demon of Good Taste

  • Global Moderator
    • Member ID: 223
  • 13,701 posts

Posted 04 January 2017 - 12:49 PM #4 Scripting and modding GF5

If 3005 works then you can presumably just do 3000 at a time and check it that way, right?  Should take 5-10 minutes to check up to 32768, and I would doubt there are IDs even remotely near that high.
"I, for one, prefer to believe that the forums are dead and that Lilith, Slarty, and I are all ghosts haunting the forum." -- Triumph

"I think we all have days where we feel like a Displacer Iguana." -- Slarty

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 04 January 2017 - 03:05 PM #5 Scripting and modding GF5

I did, using 1500. Haven't thought to go as high as 3000 back then. I was sure I would get my numbers "just around the corner". Stopped at about 15000. The 3000 figure is what I ended up when double checking. I triple-checked using 5000...
Is it possible that some creatures don't have an id? Could it be because said mages have been killed and then respawned?
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Refugees from Menzoberranzan Refugees from Menzoberranzan

The Demon of Good Taste

  • Global Moderator
    • Member ID: 223
  • 13,701 posts

Posted 04 January 2017 - 04:15 PM #6 Scripting and modding GF5

It is probably not possible that some entities don't have an ID.  The game's procedures for things like targeting all read in entity IDs just as plain numbers.

(I'm using "entity" here to distinguish these numbers, which AFAIK refer to an actual real live creature on (or hidden in) the current zone, as opposed to IDs used by the creature definitions, zone definitions, etc.)
"I, for one, prefer to believe that the forums are dead and that Lilith, Slarty, and I are all ghosts haunting the forum." -- Triumph

"I think we all have days where we feel like a Displacer Iguana." -- Slarty

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 04 January 2017 - 04:27 PM #7 Scripting and modding GF5

Unlikely that certain entities don't have an IDs. No ID = No entity, I think. There's probably a number for each entity, it's just probably really goddamn huge in some cases (No idea why).

What I wanna know if its possible to script in upgrades for companions like it was in GF3. What I'm trying to do is add companions into the game, and I want to give them upgrades to their weapons, armor, resistances, etc. over the course of the game from certain NPCs. Basically you give your companions upgrades to their overall abilities in return for giving money, doing a quest, or just by having enough leadership. However, I'm not sure how this is implemented; I have GF3's scripts, and I don't really see much indication on how the upgrade works. I only know that 1) The upgrades starts to work when you leave the zone and enter a new one, and 2) Each weapon upgrade sets off a certain flag, increasing it by 1.

I can speculate that the flag probably tells the game to change the character script or something like that, but I have no idea how to replicate that idea into this game.

Refugees from Menzoberranzan Refugees from Menzoberranzan

The Demon of Good Taste

  • Global Moderator
    • Member ID: 223
  • 13,701 posts

Posted 04 January 2017 - 05:07 PM #8 Scripting and modding GF5

Those are probably hardcoded.  You might be able to upgrade stats including armor/resistance though with alter_stat.  No idea if that will survive a save/reload but it's worth trying out.
"I, for one, prefer to believe that the forums are dead and that Lilith, Slarty, and I are all ghosts haunting the forum." -- Triumph

"I think we all have days where we feel like a Displacer Iguana." -- Slarty

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 04 January 2017 - 05:59 PM #9 Scripting and modding GF5

I think it uses something different to boost armor and resistances for companions. Need to check. Kinda sad that the weapon upgrades are likely hardcoded; I thought it was a cool mechanic, and it would've really helped ensure that the companion would scale well into the late game (New, stronger attack is more useful than a couple of boosted stats, IMO). Oh well, I'll just have to find a workaround.

Edit: Nvm. Question I asked was already answered before.

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 04 January 2017 - 10:57 PM #10 Scripting and modding GF5

Weeeeell... perhaps you could create\mod a different creature type and replace your companion. But this is a rough method and requires using those unused creature slots and then the editor to add that new creature somewhere.


In any case Gameman, do you think you could polish a bit your text-mostly mod? It would be absolutely great to have actual content mods that would strengthen the story. I wanted to try playing an agent or shocktrooper but I was worried about the lack of creations. I like having many powerful creations.
Perhaps a mod for GF4? I would like to replay it and mods would make it better...
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 05 January 2017 - 02:14 AM #11 Scripting and modding GF5

That's been done before, in GF4. If you took that servile from the rebel safehouse (name is Khur I think), and you play pro shaper in that game (basically doing anything to help Shaftoe or Eliza), what happens when you go to Moesh's bunker is that Khur proceeds to turn on you and attack you. I looked in the code and saw that all it does is remove Khur and spawns in a new character in his place that is built into the zone. It can probably be replicated in the case of companion upgrades, essentially replacing an old character with a new one. Might be even better, considering you can change everything about said companion after each upgrade if you wanted to (appearance, abilities, attacks, resistances, etc).

As for my modifications alhoon, I hate to break it to you, but none of my changes at the moment are worthy to be called mods. I did very minor modifications for my own use back when I first discovered scripting (making the Geneforge in GF4 and GF5 give you much bigger stat boosts, for example), and the ones that did get deeper into the game are clunky, messy, and in some cases, half baked and sloppy. I won't be releasing mods anytime soon. Sorry. But on the bright side, you (alhoon) were the one who showed me that this game has potential for modding. You've also shown me that there are ways to modify this game even more deeply than I thought. I might actually try to go deeper in my attempts at modding (I do it for fun though, mostly). Considering that you wanted to get more people to try out modding, I'd say you've done a good job in that respect. :)

As for the lack of creations problem, it wouldn't be hard to script creations in certain zones to join you. I personally think that the point of an Agent/Infiltrator is to play singleton, but that's just me. Dunno why you brought up Shock Troopers; isn't that class supposed to be strong at shaping, average weapon fighting, weak magic?



alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 05 January 2017 - 02:53 AM #12 Scripting and modding GF5

Yes. But average at weapons means I have to put stats there and in strength. I can't go for Shaper-built, cause unlike the Shaper that needs intelligence, some shaping, leadership and mechanics and practically little else (I've found that you don't need to buy anything up to 10; make the artifacts that give those insane bonuses to creations and they count as +6 levels or something; my cryora could kill an Unbound near end level)... shocktrooper would need combat stats, a little strength and dexterity and magic is more expensive. So I would need to have a little less intelligence, hence 1-2 less creations.


That aside: It seems that after you kill something, the
if (char_in_party(num) > 0) doesn't function properly.

Alas, I'll have to add a new mage there and try again.

EDIT: The above was not true. No ID for anyone seems to work in the Drypeaks, but they DO work for people elsewhere. I can use the char_in_party for people respawned in a couple of different zones I've tested. Just NOT the Drypeaks.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Refugees from Menzoberranzan Refugees from Menzoberranzan

The Demon of Good Taste

  • Global Moderator
    • Member ID: 223
  • 13,701 posts

Posted 05 January 2017 - 05:58 AM #13 Scripting and modding GF5

View PostGameman112358, on 04 January 2017 - 05:59 PM, said:

I think it uses something different to boost armor and resistances for companions. Need to check. Kinda sad that the weapon upgrades are likely hardcoded; I thought it was a cool mechanic, and it would've really helped ensure that the companion would scale well into the late game (New, stronger attack is more useful than a couple of boosted stats, IMO). Oh well, I'll just have to find a workaround.

Edit: Nvm. Question I asked was already answered before.
This post changed completely (almost 100%) since I last looked at the thread.  Not sure what happened there.  Importantly, you wrote before that alter_stat changes to creations are retained through reloads, which is important information!

Also -- you CAN add any stats the PC has to your NPCs even if the stats aren't displayed anywhere.  They will still take effect.  The game does this itself -- e.g., Gazers have Luck.  So you could add Parry or Quick Action, for example.
"I, for one, prefer to believe that the forums are dead and that Lilith, Slarty, and I are all ghosts haunting the forum." -- Triumph

"I think we all have days where we feel like a Displacer Iguana." -- Slarty

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 05 January 2017 - 06:19 AM #14 Scripting and modding GF5

alter_stat changes are kept? Good to know. Very, very good.
Anyone remembers my Gazerforge suggestion? That makes it easier to implement. :cool:
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 05 January 2017 - 02:21 PM #15 Scripting and modding GF5

View PostScylacagetis, on 05 January 2017 - 05:58 AM, said:

This post changed completely (almost 100%) since I last looked at the thread.  Not sure what happened there.  Importantly, you wrote before that alter_stat changes to creations are retained through reloads, which is important information!

Also -- you CAN add any stats the PC has to your NPCs even if the stats aren't displayed anywhere.  They will still take effect.  The game does this itself -- e.g., Gazers have Luck.  So you could add Parry or Quick Action, for example.

I changed that entire post because a lot of it was stuff that I wasn't 100% sure of myself, and I was worried that I was going to mislead people, so I changed most of it. I think alter_stat changes on creations probably can survive on creations, but at the same time, I'm not exactly sure how to use alter_stat on creations in game; it only seems to work for the PC, and I've tried to use it on creations, but it never seems to work. If someone can tell me how to alter stats of creations in game, I'd really like to know. I can then test it to see what works and what doesn't.

alhoon, are you sure the Zone Simulator links are working? I've tried to get the Zone Simulator, but every time I try to get access to it, I get redirected to this link: https://cdn.calref.n...589a8663c6e.zip, which then says 'access denied'. Am I missing something here?

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 05 January 2017 - 02:23 PM #16 Scripting and modding GF5

Yes. It's the link in post 13 of this thread: http://spiderwebforu...zone-simulator/
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 05 January 2017 - 02:32 PM #17 Scripting and modding GF5

Oh okay. Its the g5 editor 7z link. I see. Looks like the other links are completely gone from the looks of it. Thanks for the clarification. :)

EDIT: Holy hell, alhoon, you weren't kidding when you said that the editor is hard to use. I'm struggling to get it to even work at all. Yikes. How the hell do you get this thing to work?

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 05 January 2017 - 09:14 PM #18 Scripting and modding GF5

With hours of dedication, following the instructions as faithfully as if they're a Shaping spell up to step 5 of the readme, and then more or less winging it.

I save the input data to a txt first and then pass them to the calc thing.

Instead of step 6, I go to the output of the lines I've added, copy the hex part, go to the myfile part, finding the exact lines (the spreadshit gives you the number of the line) and replacing them. Then I replace the whole zone with the new one.

To test, don't load from within the zone. Load from outside and go in. If it Crashes to Desktop, you messed up.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 06 January 2017 - 02:19 PM #19 Scripting and modding GF5

Okay, I managed to get the thing to work. The entire GF5scendata.dat file is now decompiled and in front of me. Now I just need to figure out how to add a new character to the game (maybe tinker around more if I can). Any tips?

EDIT: Also, the good part about the editor being in OpenOffice means that it works for macs too, I think. Just a little tidbit I thought I'd bring up. :)

EDIT 2: I actually ignored the part where it said to delete everything before and after a certain point. I simply stuffed the editor with the entire file. Looks fine, from what I see.

EDIT 3: Ugh. Forgive me if I sound like I'm whining a bit, but trying to edit hex coding is a heck of a lot harder than I thought...

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 06 January 2017 - 11:23 PM #20 Scripting and modding GF5

That's why you have to delete everything above and below the zone you want...

After you isolate your zone, use the bat-file to make it readable. Paste on a txt to get the right sizes.
Copy from there. Paste on the right place in the calc thing and it will be usable.
After I isolate a zone, it takes me less than 2 minutes to add someone and test.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 06 January 2017 - 11:55 PM #21 Scripting and modding GF5

Lol. I just realized that. I'm a freaking idiot. :p

I thought I could be clever and stuff the entire file into the thing. Oh well. Sorry for annoying everyone with my inability to follow instructions. :p I'll stop wasting your time now alhoon.

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 07 January 2017 - 06:06 AM #22 Scripting and modding GF5

Sorry if I came along as attacking you or I was offensive, it was not my intention. I don't consider it time wasted. If I did... I would simply not answer. It is not a bother.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Department of Homeopathic Warfare Department of Homeopathic Warfare

Alorael

  • Administrator
    • Member ID: 276
  • 22,087 posts
  • LocationElsewhere

Posted 07 January 2017 - 09:22 AM #23 Scripting and modding GF5

Fair warning:

Quote

Game data files/scripts and saved games that have been edited, using cheat codes or not, are unsupported. Spiderweb Software cannot properly support game files that have been edited in ways we can't examine or control.

—Alorael, who is not technically savvy enough to contribute more usefully here. He can't even wish you good luck given the absence of a role for chance in mucking with code.

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 11 January 2017 - 12:02 AM #24 Scripting and modding GF5

I think it's safe to say any modder that messes with GF5's game data knows the risks that come with it. The warning is appreciated however. :)

Currently trying to learn what's going on in the hex file for the scenario data using the simulator. Still very new to this, but I'll pick it up eventually. No crazy mods from me though.

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 11 January 2017 - 12:09 AM #25 Scripting and modding GF5

Adding people is very easy with it though, once you do it 2-3 times. I even wrote a script for a character!
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 11 January 2017 - 02:59 PM #26 Scripting and modding GF5

Haven't have the chance to test a new theory for the missing IDs but here it is: I always put an "erase char" clause for the extra characters I add, so that the player won't meet them before their time. When the conditions are met, I spawn them. Yet, the erase char may be the problem; I'll try spawning them in the locked areas (i.e. behind the rock borders etc) and relocate them instead when the conditions are met.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 12 January 2017 - 01:33 AM #27 Scripting and modding GF5

WARNING: SPOILERS IN THIS POST FOR BOTH GF4 AND GF5. ALSO VERY LENGTHY. YOU HAVE BEEN WARNED.

I've managed to add new characters into the game. You're right alhoon, the Zone Simulator isn't too terribly difficult to use regarding adding characters; certainly not as bad as I was expecting it to be. Which is nice. :)

Anyway, what I've done first is add Shaila into the game. You can get her in Isenwood's Spire, and only if you turn in Mehken to Rawal (Most players seem to do that anyway; Mehken as a companion is short lived, and the extra stats are nice. Might change this later though) (Note, most of this is for experimentation only; no mod releases from me yet. This is me rambling my thoughts and what I'm doing. Any modders reading this may get some ideas though).

Why did I implement her? Well, I was a little disappointed that we hear utterly nothing about her after GF4. True, she is a minor character, meant to be your early game boss in GF4, and easily gotten rid of and forgotten by the player, but on the other hand, she was able to get the attention of both the rebels and Shapers, which isn't something to scoff at. My speculated back story for her is that she might've been an apprentice mage trying to learn more potent magic, but the Shapers, for some reason or another, make it very difficult for her to learn more magic, thus preventing her from becoming more powerful (think that mage in Fort Vengeance, if you've gotten that far in GF5. I think her name is Cyprien, or something). It's one of the few explanations I can think of that would explain why she would turn to the rebels in the first place.

My thoughts are that during the events of GF4, she was brought to the Foundry, where the GF5 Protagonist starts. Sorta thought that since the Foundry is the place that studies the modifications caused by Shaping (The Foundry seems to analyze any anomaly that comes from Shaping itself), they might know what to do to fix what the Geneforge did to her (Given that she was essentially Shaped by the Geneforge). Of course, given that Rawal runs the Foundry, he implants a control tool into her and pretty much does nothing to cure her (I wouldn't really expect a lying rat like Rawal to keep the Shaper's promise to cure Shaila).

She is cured the same way the GF5 protagonist is; using the Geneforge that Rawal has been keeping a secret. The reason is because the GF5 protagonist, before using Rawal's Geneforge, is shown to have been heavily damaged, mentally and physically, from too many modifications that were made too quickly or sloppily. We know that canisters can cause mental instability, and that the Geneforge is even more severe in this regard. We also know (in the case of poor Shaila) that the Geneforge can cause serious physical defects in individuals. How using a Geneforge twice fixes mental instability and physical problems from over-modification is beyond me (since using a Geneforge twice in GF4 kills you right then and there...), but hey, it works out for Shaila in the end, since she is cured ,ironically, by the same device that got her into this mess in the first place.

What I was hoping to do was something like your companions in GF3. Weapon upgrades, new abilities, upgraded resistances, companion opinions, etc. The weapon upgrades in GF3 were likely hardcoded, meaning that they can't be replicated in GF5 exactly like in GF3, but there is a workaround. Using the Zone Simulator, you can just add a new character to a zone, essentially your companion with all of the upgrades you want, then make it so that once you pay certain NPCs to train your companion, it simply takes the current companion out of your party and replaces it with the new, upgraded one. It's rough code wise, since you do want to make sure you don't have duplicates of your companions for example, but it does give you more freedom, because you can change the graphics, resistances, attacks, etc. of your companion much more.


Shaila as a character I imagine would be very adept at using debuffing magic, causing debilitating status effects (such as curse, weaken, fear, charm, etc.) on her enemies. Stuff like Daze and Fear seem to be essentially messing with the opponent's mental state directly, and given that her mind was completely warped by the Geneforge, she probably pretty good at screwing with the enemies' heads. I wish there was a way for attacks to do multiple status effects on enemies, but I have not found any way to do so yet. So for now, this is how I mapped it out for Shaila in terms of power:

EARLY GAME (Dealing with the Presence, doing stuff in the Whitespires, etc.): Shaila is the same as she was in GF4, stat and ability wise. I literally took her stats in GF4 and copy pasted it into GF5. She does have quite a bit of base health (150, to be precise), but her Ice Spray attack isn't going to be the most impressive thing in the world.

POST-GENEFORGE USE (You have defeated the Presence at this point, essentially.): Because she is restored by the Geneforge, Shaila is going to be stronger than before, given that now she can channel her power without being distracted by the physical pain and mental instability plaguing her before. Her Ice Spray now will be equal in power to the regular Ice Spray that the PC gets from NPC trainers. She also gains some small stat boosts. Not sure if this is too much in the early game, but I'll take a look when the time comes.

MID-GAME (Mera-Tev, helping Astoria): With a fee, Shaila can be taught stronger magic by Shaper Quothe. After her training, she uses a slightly less energy intensive (but no less powerful to the regular) version of the Essence Orbs spell, as well as a few bonuses to stats and resistances. She gets some resistance to mental effects, such as charm, fear, and daze. Additionally, her melee is capable of inflicting the fear status effect in enemies that get hit by said melee. You're not going to use her melee much, given that she's not supposed to be up at the front soaking up damage, but it's decent for 'oh sh*t' situations where enemies bum rush her. Gives her a little bit of crowd control and some time for you to take out enemies that aren't running around in fear. Might be a little too much in this part of the game, but I'll see.

LATE TO VERY LATE GAME (You're in the Storm Plains, Dera Reaches, Gazaki-Uss, getting Alwan's quest, meeting Ghaldring, meeting Taygen, etc.): Shaila gets her last and strongest upgrade at this point from Sage Pavyl in Stormhold. It will take quite a bit of money to get the upgrade, but it is one of the strongest upgrades. She gets large bonuses to stats and resistances, as well as a less energy intense version of Dampening Field (The AoE Curse attack Podlings use against you) that does significantly more damage compared to the ones that Podlings use. Her melee now can Slow+Fear (found a limited workaround so it is possible to have two status effects on a melee attack), and she becomes completely immune to mental effects, such as fear, charm, daze, etc.

What I want to know if its possible to have attacks (both ranged and melee) have multiple status effects inflicted upon an enemy (such as curse+slow, or fear+curse, etc). I'm also curious if it is possible to have zones be changed in terms of appearance over time (Something like the Shaper school in Greenwood Isle in GF3, where you leave the school, and when you return, there are more people and the areas have been cleaned and swept, to show that the school is being rebuilt). Also, thinking about it, the Zone Simulator can also be good for modifying zones that have disappointing boss fights (IMO, the fight with Greta in Inner Gazaki-Uss for example is pretty underwhelming; she is, code wise, literally a renamed generic agent, nothing else. It would be pretty easy to replace her code to have a unique character for her. I found her GF4 incarnation, the one where she uses Essence Orbs and has a stronger melee attack, to be much cooler and stronger. I could probably think of some other things for her too while I'm at it, but that's for later), or if modders want to make certain zones even harder to get through (probably wouldn't be hard to add a ton of enemies in certain zones, or make enemies stronger, or whatever else is possible).

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 12 January 2017 - 04:05 AM #28 Scripting and modding GF5

Shaila: She didn't just had the attention of both the rebels and the Shapers. She was a lifecrafter gone insane that turned her back to the Rebellion in disgust for their practices. I.e. she's ideal for Rawal.
Her purpose to GF4 is IMO to give an RP reason for the player to join the Shapers (despite them being bad) by proving that both sides are bad, so pick the bad guys you prefer.
Your Shaila Origin story (mage that got angry) fits but frankly, in GF4 the Rebels were pulling people out of farms, giving them a month or so training and turned them to the Geneforge. Those that survived the ordeal intact and sane, progressed.

Rawal or someone else IMO should have cured her insanity and mania. Shaila was psychotic in GF4. Monarch\Moseh-wannabe. I would stay away from having her being cured the same way; it was a lucky coincidence for the player, one in a thousand chance.
Touching a second Geneforge and your sanity returns would be a dangerous thing to add to the lore and two characters in a row doing it would be bad. If it was that easy, Litalia could have done it.

Doubling Shaila: You forget an important problem: As Shaila gains levels, her stats can be increased, essence free. I.e. If you get Shaila at level 6 and then you replace her with new Shaila at level 15, in those 9 levels, Old Shaila would have got 18 improvements! The only way I've thought to address that in my mod is to just increase the level of the companion after a modification, or maximum health or resistances.
However I think there's a way to "activate" abilities, scriptwise. I haven't found that way, but I am sure someone smarter and more experienced could think of something.
And if it comes to that, you could ALWAYS make a script to copy-paste in all zones that activates in certain conditions (like Shaila's training, whether she had used special powers recently etc). If you're not in a hurry, you could see the scripts I make for bosses and enemies once I release the warrior mod and adapt it. Or, more realistically, you could keep it for a couple boss-zones.

Changing zones over time:
Yes. When I go home I'll give you the commands I use for the gradual repair of the bonepeak ruins.

Greta in Gazaki Uss:
You don't need the editor I think; she has a script for that Zone although I can't be sure until I head home and check. If she has the "basic" script, then yes, you should create a new one and replace it. General of the Rebellion my butt; I had bigger problems killing the random Drakons. She has some good moves I think, but she's way too low level. She should be as tough as Astoria IMO.
I'll try to fix it.

Making zones harder: Doesn't require the editor necessarily. It can be done with scripting, and it's quite easy to do... Not fast, easy. Like increasing the level of aaaaaall the enemies in the zone if something happens. Check my Rockfall script to see what I did and keep in mind that was before I have cut my teeth in scripting. The scripts I use now are more elegant.
Another example of "That's too easy" is upper Gazaki Uss. There are two Unbound in the lab of Gazaki Uss. They could have joined the fight...
It's very simple script-wise to make them hostile and have them arrive as the player finishes off the gem-spawning guards to the inner Gazaki Uss. The battle was so easy that I stayed there and killed enough mobs to get over 30 gems.
However keep in mind that people may be way lower in level than completionists. If you do a mod for other people, not just for you, keep that in mind; Two Unbound joining the fight in Gazaki Uss would obliterate the Shaper forces unless the Player joins with a good force of himself and is ~40 level. Or just hides in the essence pool and spawns an endless stream of creations to chip the Unbound slowly.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 12 January 2017 - 08:49 AM #29 Scripting and modding GF5

Commands I use for repair:
Note, this seems huge because the copy-paste is wonky. I just copied the whole thing I use instead of using one improvement.
As you can see, the higher the value of hijacked flag (2,3), the more repairs happening.
You can see in the editor the floors and terrains. There's a list waaaay down.

This goes to INIT_STAGE

Spoiler

"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 12 January 2017 - 03:32 PM #30 Scripting and modding GF5

View Postalhoon, on 12 January 2017 - 04:05 AM, said:

Shaila: She didn't just had the attention of both the rebels and the Shapers. She was a lifecrafter gone insane that turned her back to the Rebellion in disgust for their practices. I.e. she's ideal for Rawal.
Her purpose to GF4 is IMO to give an RP reason for the player to join the Shapers (despite them being bad) by proving that both sides are bad, so pick the bad guys you prefer.
Your Shaila Origin story (mage that got angry) fits but frankly, in GF4 the Rebels were pulling people out of farms, giving them a month or so training and turned them to the Geneforge. Those that survived the ordeal intact and sane, progressed.
There are lots of possible stories for Shaila, given how little we know about her. I picked the resentful mage one simply because I wanted to give a line of reasoning of why she would become so powerful once you started getting her upgrades. I have trouble imagining some random Geneforged schmuck becoming incredibly powerful over the course of GF5, given how arrogant a lot of them become, but an aspiring mage who already had magical attunement that turned to the Geneforge for more power would make a lot more sense. That's just me though; there's probably numerous reasons people can think of to justify such large gains in power over a short period of time.

View Postalhoon, on 12 January 2017 - 04:05 AM, said:

Rawal or someone else IMO should have cured her insanity and mania. Shaila was psychotic in GF4. Monarch\Moseh-wannabe. I would stay away from having her being cured the same way; it was a lucky coincidence for the player, one in a thousand chance.
Touching a second Geneforge and your sanity returns would be a dangerous thing to add to the lore and two characters in a row doing it would be bad. If it was that easy, Litalia could have done it.
You are right about the Geneforge thing; thinking about it, the PC must've been astronomically lucky to have the Geneforge do what it did to them. Especially considering that in GF4, if you use the Geneforge twice, you die right then and there. I'll probably make it so that Shaila is cured of her Geneforge-induced insanity and defects when you meet her, and say that the Shapers managed to find a way to cure her (Bit of handwaving on my part, but I'll probably think of a better explanation later).

View Postalhoon, on 12 January 2017 - 04:05 AM, said:

Doubling Shaila: You forget an important problem: As Shaila gains levels, her stats can be increased, essence free. I.e. If you get Shaila at level 6 and then you replace her with new Shaila at level 15, in those 9 levels, Old Shaila would have got 18 improvements! The only way I've thought to address that in my mod is to just increase the level of the companion after a modification, or maximum health or resistances.
However I think there's a way to "activate" abilities, scriptwise. I haven't found that way, but I am sure someone smarter and more experienced could think of something.
And if it comes to that, you could ALWAYS make a script to copy-paste in all zones that activates in certain conditions (like Shaila's training, whether she had used special powers recently etc). If you're not in a hurry, you could see the scripts I make for bosses and enemies once I release the warrior mod and adapt it. Or, more realistically, you could keep it for a couple boss-zones.
I'm in no hurry. Most of these modifications are for personal use only for now, and really, I'm just spitballing what I've done and seeing if it causes modders to get some good ideas. I'm looking forward to seeing your work in the warrior mod when it comes out. :)
You are right about Shaila regarding stat increases. The stat increases were a tricky thing to deal with. Initially, I was planning to simply make the character replacement have most or all of the stat boosts that the player gave to her over the course of the game, but I got rid of that idea because the free stats are gone, now rolled into her regular stats (To take your example Alhoon, that means that those 18 improvements are now added into the new character's normal stats). That meant that Shaila's power would snowball out of control, possibly being far more powerful than top tier creations made by a Shaper/Lifecrafter (Would need to test this though). Though I should point something out; you can add other stats to creations, such as Quick Action, Parry, Battle Magic, etc. Shaila is no exception to this. The player can increase her Strength, Endurance, Intelligence, and Dexterity, but nothing else. I can just make it so that she gains points in Battle Magic and other stats to ensure that the new character can keep up. I was also hoping that the new character's upgraded attacks and abilities would alleviate this as well (Shaila's Ice Spray is not nearly as good as Essence Orbs or a high damage version of Dampening Field, for example). I would need to test this to see what happens though; she is only one character after all, who takes a creation slot in your party..

View Postalhoon, on 12 January 2017 - 04:05 AM, said:

Changing zones over time:
Yes. When I go home I'll give you the commands I use for the gradual repair of the bonepeak ruins.

Greta in Gazaki Uss:
You don't need the editor I think; she has a script for that Zone although I can't be sure until I head home and check. If she has the "basic" script, then yes, you should create a new one and replace it. General of the Rebellion my butt; I had bigger problems killing the random Drakons. She has some good moves I think, but she's way too low level. She should be as tough as Astoria IMO.
I'll try to fix it.
I have seen your zone changing over time. It is pretty thorough. I'll keep it in mind as I continue on my modding adventures.
The problem with Greta is that her character is literally a generic agent renamed. I checked the zone code that are used to reference her character; it is a generic agent that shoots Searer a bunch and has generic agent abilities. The low level doesn't help. When I'm fighting an endgame boss, I should get that feeling of "Holy sh*t, this is a tough fight!". I don't get that with Greta. I dunno why it was coded and scripted that way; I was expecting her GF4 incarnation, where she has stronger melee and shoots a bunch of Essence Orbs. But it wouldn't be hard to make Greta a harder boss; simply make the Zone Simulator reference a different character that looks exactly like Greta, and use a different script/alter Greta's script to be more unique. Makes me have a few ideas... Greta with Diamond Spray anyone?

View Postalhoon, on 12 January 2017 - 04:05 AM, said:

Making zones harder: Doesn't require the editor necessarily. It can be done with scripting, and it's quite easy to do... Not fast, easy. Like increasing the level of aaaaaall the enemies in the zone if something happens. Check my Rockfall script to see what I did and keep in mind that was before I have cut my teeth in scripting. The scripts I use now are more elegant.
Another example of "That's too easy" is upper Gazaki Uss. There are two Unbound in the lab of Gazaki Uss. They could have joined the fight...
It's very simple script-wise to make them hostile and have them arrive as the player finishes off the gem-spawning guards to the inner Gazaki Uss. The battle was so easy that I stayed there and killed enough mobs to get over 30 gems.
However keep in mind that people may be way lower in level than completionists. If you do a mod for other people, not just for you, keep that in mind; Two Unbound joining the fight in Gazaki Uss would obliterate the Shaper forces unless the Player joins with a good force of himself and is ~40 level. Or just hides in the essence pool and spawns an endless stream of creations to chip the Unbound slowly.
I'm no completionist; I play on normal, not torment, and I don't try to level grind like crazy, so I know that people that follow just the storyline will be much lower level. I'm not going to make the zones super hard, per se. But rather, more chaotic. You're in the middle of a battle; it should be filled with lot of soldiers and creations on both sides duking it out (Though I can already imagine problems; the Perikalia Orchards are an example of that). If I take your example, bringing in the Unbound in Gazaki-Uss to fight, I would buff the attacking Shaper forces, either by making existing forces much stronger, or by adding more creations and some extra warriors, so that the player still has a chance to turn the tide.

Sorry that this post is so long. I like to go into detail with everything I read, so my posts usually end up being really long because of it.

EDIT: Spoilers to GF5 endings have been mostly removed. Please play the game and don't read spoilers. You'll enjoy the game more if you don't know what's going to happen next. :)

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 12 January 2017 - 07:29 PM #31 Scripting and modding GF5

Adding many creations to a fight: Remember the battle in the bridge of Dera Reaches? With the countless creations fighting each other and the player sitting in the sidelines? That was one of the worse experiences I had in GF5.

Greta's diamond spray: Much of those could just be added with a script. I'll provide one, again from mod.

This is for giving slow to all the party members. You can add it to a Shaper script made for Greta, after the "creates magical shield" etc.
Spoiler

This is for doing some poison damage (Area of Effect) and poison status. Same thing as before and can be added after the previous.
Spoiler


Etc. You can add whatever you want to make Greta tougher.


About your views on factions on GF4 and GF5.: I agree, 95+% However, this thread is about scripting tricks, not spoilers about the GF5 endings. Would you mind removing those spoilers?
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 12 January 2017 - 08:25 PM #32 Scripting and modding GF5

Yeah, fights that have tons of enemies in them don't really translate well into turn by turn combat gameplay. If it was all in real time, I'd probably be happy to add tons of enemies. But it isn't, so what can you do. Spoilers for the endings have been removed, btw.
Little tidbit from my experiments; it isn't really possible for companions to be able to shape creations (I really wish they were able to...), but what you can do is make it so that if you have a certain character with you and you're fighting a boss, several creations will spawn on your side, to simulate the effect that your companion is shaping creations to help you fight in battle. The creations made and their strength can be determined by a certain flag in the scripts, which will put more strength into said creations if you are doing more to train your companion. Great for my experiments, considering that Shaila is able to Shape creations. Might also be good if you have a companion that is a Lifecrafter or something like that.
Example: Whenever you fight the Presence early in the game, you can make it so that if you have a certain character in your party (in my case, Shaila), several early game creations such as fyoras and artilas will be created to fight alongside you, to simulate the effect that Shaila is Shaping creations to help you. Can be tweaked for late game where in boss fights creations such as Wingbolts, Kyshakks, and War Tralls are spawned. Probably shouldn't apply to every boss fight, at least early on. (Presence in its Fyora form and Servile forms are relatively easy to fight; not worth it to try and spawn a bunch of supporting creations. Servant Mind form is probably where it's appropriate, given that you fight a ton of enemies at once in that fight). I might even add certain unique creations to be spawned, since I kinda think that Shaila would play fast and loose with creation variations (Basically creations that are capable of spraying fire everywhere, having a strong debuff ability, etc. Would only happen in later parts of the game, and aren't going to be so powerful that they trivialize boss fights, to make it fair). Dunno why I think that way, I kinda just do. XD

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 13 January 2017 - 04:52 AM #33 Scripting and modding GF5

Shaping companions: Not in the player's sense, no. But they can do it in the traditional game-world sense, and you can add the creations to the group. I.e. put it in an area's script or discussion, like tying it to an object or when your party size goes below X. Then you add the creation in the group. Also, important: While testing I accidentally gave to my character control over a large group that didn't show in my party. I could move them, but their script was still running; i.e. they were returning to their positions if unaffected. I am not sure how I did it, I've done several wrong things with these entries after all.
But thing is, I could control (blue circle) a bunch of NPCs despite party limitations and they had their script active. I think I set their attitude to 0. Which can be done by the script. But I haven't tested it.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound

Gameman112358 Gameman112358

Mercenary

  • Member
    • Member ID: 18,737
  • 64 posts

Posted 13 January 2017 - 02:05 PM #34 Scripting and modding GF5

That thing you were talking about (The whole able to control a large group that isn't in your party) seems to happen if you either screw up their character entries in the Zone Simulator or if you set their attitude to 0. I would need to take a look at that myself. It definitely happens if you screw up character entries in the Zone Simulator.
Also, when I said spawn creations, I meant more like temporary creations, not creations that join your party. What I did was that if you have a character with you in a boss fight, the script will spawn several creations to help you. Once the boss has been defeated, I have the script erase the creations (Basically your companion is making expendable creations). Creations that join your party might be pretty useful though, given that they take no essence to level up. But they take a creation slot, meaning that there is an opportunity cost in doing so (taking a creation in means that it will scale better over the course of the game thanks to free level ups, but that means that you lose a creation slot. A slot that could be used for any other creation; Vlish, Drayks, etc.)

EDIT: Also, I keep getting an error that goes like this: "0.txt Error: Tried to run invalid creature script..." I don't really know what I did exactly to cause it...

alhoon alhoon

Sorcerer

  • Member
    • Member ID: 16,946
  • 620 posts

Posted 13 January 2017 - 03:09 PM #35 Scripting and modding GF5

Unexplained error: Reverse everything and go to the previous thing that worked. Also, I would avoid naming scripts just "0". Go for something bigger, like "MyScpt0" or something. I would also stay below 8 letters in the name.
"I am not mad, no matter what you're implying." - Litalia

GF5 mod with extra quest chain here!  Discover who you are and set up your base.

"Ohhh, no! No, it's so close! So close!" - Blxz, ambushed by an Unbound





Also tagged with one or more of these keywords: Geneforge, GF, modding, mod, editor, script

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users