Fallout 2 mod arrays

you are the man,thxn stalin

edit : my sfall globals for perks numbers around 7000,think it is worth the effort to transfer over to arrays?

edit 2: late but Gonna Give example

here ....

edit 3:will this procedure cause problems if called repeatedly?

Code:
procedure GetPerkValue(variable PerkArrayName, variable ArrayLocation) begin
   variable ArrayName := load_array(PerkArrayName);
   return ArrayName[ArrayLocation];
end
 

Attachments

Last edited:
I rewrote the script in the previous post, use that method instead of global variables,
forget about arrays, they are not needed and they are not convenient for this.

edit 3:will this procedure cause problems if called repeatedly?
I do not know.
but this variant with the saving of the array is the same bad as with global variables.
Or explain what is the need to keep data perks in the file save the game?
 
Or explain what is the need to keep data perks in the file save the game?

I Dont think it matter much,But However if ima switch to all arrays i would then have to set a few of the array[values] in game(tho havent added them yet)and make them persistant

edit :
this variant with the saving of the array is the same bad as with global variables.

so u think it is worth the hundreds of potential hours to switch from globals to arrays?
 
Where can I download your mod and source script?
I would look at what is there so long time to switch to arrays.
 
it isnt one mod,it is several,and i was guessing the hours to do it,anyway this is a zip of most the associated files,there fight
 

Attachments

Ohhh, this is a nightmare), with such an amount of text, it is better to stay on global variables and not touch anything)).
You initially chose the wrong approach to writing scripts to perks.
A lot of duplicate text, why you didn't use macros.
 
meh,using arrays it seems now,there fight isnt worth the effort ,thnx guys

edit :
new variant: get_npc_level(PID_VIC)

thnx,this affects my party perks mod too,gonna make a new release soon
 
Last edited:
Back
Top