Ashes42
Sergeant
This is a topic for coding questions. If you see I made it so you could change your banner, and you can't figure out how I did it in the code, this is the place. This is basically, tech talk with me ; ) and anyone else who shows up.
I already posted some of this in the MOD dev board, but I think I actually get more traffic here, and its more like a personal conversation here... I dunno whatev.
My current issues holding up the NPC system are relatively simple. Names and Stats. Before I can make the new AI I need new NPCs, and a creation mechanic for them. There are a number of ways to approach this. The best thing would be if I could re-write the troops file whenever I saw fit, though that could have cross save-game problems. The other thing that works is if I get system calls to access the array in which each item/troop/faction/whatever is. This actually would make me most happy. Right now in header_operations I have the function calls store_character_level and str_store_troop_name. So I can retrieve the information, but I really need to be able to set it. I also need to be able to remove xp, I may actually be able to do this, but I am unsure, and it doesn't work if I can't prevent it from hitting negative. (I can change skills and attributes using the raise_attribute call, which accepts a negative raise, and clamps the value to not go below 0, an extremely useful tactic.)
Thats actually going to be the next thing I try ; ), time for test-code.
I also need to be able to change names though, names of NPCs and names of factions.
*edit* Ok add_xp can take a negative value, so I can reset the xp down, but I can't figure out how to lower their level, which is problematic
I already posted some of this in the MOD dev board, but I think I actually get more traffic here, and its more like a personal conversation here... I dunno whatev.
My current issues holding up the NPC system are relatively simple. Names and Stats. Before I can make the new AI I need new NPCs, and a creation mechanic for them. There are a number of ways to approach this. The best thing would be if I could re-write the troops file whenever I saw fit, though that could have cross save-game problems. The other thing that works is if I get system calls to access the array in which each item/troop/faction/whatever is. This actually would make me most happy. Right now in header_operations I have the function calls store_character_level and str_store_troop_name. So I can retrieve the information, but I really need to be able to set it. I also need to be able to remove xp, I may actually be able to do this, but I am unsure, and it doesn't work if I can't prevent it from hitting negative. (I can change skills and attributes using the raise_attribute call, which accepts a negative raise, and clamps the value to not go below 0, an extremely useful tactic.)
Thats actually going to be the next thing I try ; ), time for test-code.
I also need to be able to change names though, names of NPCs and names of factions.
*edit* Ok add_xp can take a negative value, so I can reset the xp down, but I can't figure out how to lower their level, which is problematic