So, I created two new ammo stacks, one caliber, and a weapon for them. Nirran helped me earlier, but megamod's scripts for example SF gun merch, are 100% different and 500% more complex.
[spoiler:455d6546f5]procedure random_ammo_town_six
begin
random_ammo_six := op_random(1, 4);
if ((random_ammo_six == 1) and (ammo_twentyfour == 0)) then
begin
ammo_twentyfour := 1;
case := 358;
end
else if ((random_ammo_six == 2) and (ammo_twentyfive == 0)) then
begin
ammo_twentyfive := 1;
case := 359;
end
else if ((random_ammo_six == 3) and (ammo_twentysix == 0)) then
begin
ammo_twentysix := 1;
case := 382;
end
else if ((random_ammo_six == 4) and (ammo_twentyseven == 0)) then
begin
ammo_twentyseven := 1;
case := 578;
end
else
case := -1;
random_ammo_six := 0;
return(case);
end[/spoiler:455d6546f5]
Is as far as I got. case := 358; is 2mm EC ammo, and as I read the script, if the town level is high enough, it is guaranteed to have EC ammo, and the others as well.
Number 578 bothers me - it is something added by megamod (most likely the AM rifle round) and it is not in the header file (surprise, surprise) so I can't be sure what it is. Thus, I cannot backtrack and investigate how to add my own just by reading the scripts. finding similarities and cross-checking. Help!
EDIT: Script here is FIGUNTB.int decompiled using FSE v1.5a into an SSL file.
[spoiler:455d6546f5]procedure random_ammo_town_six
begin
random_ammo_six := op_random(1, 4);
if ((random_ammo_six == 1) and (ammo_twentyfour == 0)) then
begin
ammo_twentyfour := 1;
case := 358;
end
else if ((random_ammo_six == 2) and (ammo_twentyfive == 0)) then
begin
ammo_twentyfive := 1;
case := 359;
end
else if ((random_ammo_six == 3) and (ammo_twentysix == 0)) then
begin
ammo_twentysix := 1;
case := 382;
end
else if ((random_ammo_six == 4) and (ammo_twentyseven == 0)) then
begin
ammo_twentyseven := 1;
case := 578;
end
else
case := -1;
random_ammo_six := 0;
return(case);
end[/spoiler:455d6546f5]
Is as far as I got. case := 358; is 2mm EC ammo, and as I read the script, if the town level is high enough, it is guaranteed to have EC ammo, and the others as well.
Number 578 bothers me - it is something added by megamod (most likely the AM rifle round) and it is not in the header file (surprise, surprise) so I can't be sure what it is. Thus, I cannot backtrack and investigate how to add my own just by reading the scripts. finding similarities and cross-checking. Help!
EDIT: Script here is FIGUNTB.int decompiled using FSE v1.5a into an SSL file.