Scripts questions

Lt_khorne

First time out of the vault
Hi all ... (sorry for my english)

Well , im have some questions about scripting ...

I need to use the same headers files for all scripts i compile ?(sorry about this stupid question , but im search the forums for this answer and find nothing ... and my level of scripting is no very well to understand some things :P) or can use different ? or modified versions ?

And for ammo :
Is possibly to make a weapon can reload using another type of ammo but consuming more AP in the process ? (5 or 6 ap)

Thanks for the time ;)

Saluty
 
Hi Lt_khorne.
I actually talked once about the thing with Jargo, and this matter is unclear.
As far as I know that's not a problem. I have many scripts running with different versions of the same headers. This is also what happens with all mods and patches (including the official ones).
As far as the ammo question is concerned it can only be done in the inventory, but...
http://survivor.10.forumer.com/index.php
That's a link to Lisac2k's site, you'll find an interesting post about the matter. Apparently Lich managed to do something similar. It's a scripting challenge, though.
See you.
 
Thanks for the reply Sirren67

Well... for the ammo , i look in the scripts & headers for find any can tell me what procedure is called when reload a weapon ... but im find a interesting part in COMMAND.H , start at line 894 and end in 1986 (i no put here all the script , only a part)
Code:
              stock_pid_qty(who_obj, PID_10MM_JHP, ammo_qty)                                 \
           end [b]else if ((weapon_pid == PID_HUNTING_RIFLE) or                                 \
                        (weapon_pid == PID_BOZAR) or                                         \
                        (weapon_pid == PID_LIGHT_SUPPORT_WEAPON) or                          \
                        (weapon_pid == PID_SNIPER_RIFLE) or                                  \
                        (weapon_pid == PID_223_PISTOL) or                                    \
                        (weapon_pid == PID_SCOPED_HUNTING_RIFLE)) then begin                 \
              stock_pid_qty(who_obj, PID_223_FMJ, ammo_qty)                                  \
end
[/b]
Well ... if i can modifiy something like this : (the main idea , is making magazines (ex : Colt 1911 .45 ... and can recharge using a Thompson .45 magazine , but requires 6 ap to reload) for all weapons using...)
Code:
			else if ((weapon_pid == PID_COLT_1911) then begin                 \
				if (obj_is_carrying_obj_pid(dude_obj, PID_COLTMAG_1911) > 0) then begin
					stock_pid_qty(who_obj, PID_THOMPSONMAG, ammo_qty) end // Here , the variables substracting the 6 ap
              stock_pid_qty(who_obj, PID_COLTMAG_1911, ammo_qty)                             \
           end
Well... this is viable ? any know how to substract action points in script ? is any error on this script (im having some problems with FSE and can´t compile scripts :S) ?

Another thanks for your time and for tolerate my bad spelling :P

Salut
 
Hi Lt_khorne.
O.k, let me see... The original header you show tells the engine to actually check the type and quantity of rounds a weapon is loaded with. This means that if a given rifle has 20 .222 fmj rounds when fully loaded and you shoot 3, then you'll get 17 .222 fmj rounds when manually unloading the weapon. If the weapon isn't registered in the header you'd get 20 (I think), or get some other strange result.
I'm sorry but I don't know if the second piece of code can work, I'm not *that* inside headers editing. Still, I got the feeling that your current inability to compile is caused by a mistake/"unlegit" editing you made in the header. Make a backup copy of your new header and try to compile with a standard copy on. You'll probably be able to compile again.
I find the magazine project interesting (JA style?) I think that in a post apoc environement you should find ammo in various clip forms.
You could do like this:
Make new magazine protos.
Have a script/ header check the type and amount.
When you unload a weapon you get the magazine instead of rounds (1). If you use the magazine you get the bullets.
Have a script/header check if you're trying to put the magazine in the correct weapon (check if the caliber is the same).
Have a script check if you're trying to reload a weapon during combat, and if the ammo clip is the one fit for a particular weapon(2).

1) If you have both rounds and rounds in magazines you should edit reloads times for weapons (ALL the protos). You could use bullets to reload empty magazines amongst other stuff... And I think someone already managed to do that. Check posts in this forums... I remember a "Is it possible to reload a bullet?" post dating back to 2/3 years ago.
2) I don't really know if you check via script if dude's in combat when in the inventory screen, AFAIK when you close the inventory window then procedure_map_update kicks in. I also don't know if you can check the current amount of spare action points when in combat...
Anyway folks, any ideas upon the matter?
 
Hi ;-)

The problem of compiling is from the program ... i contact Jargo and asking for some solutions , but seems to be a very occupied person (i understand ) . Im using all the files from fresh install... test with patch updates... and nothing...

The basic idea for magazines is near this : (i know the limit of 50 ammo types... this is right no ?)
Each weapon using magazine have a explicit type of ammo (9mm is not the same as Beretta 9mm Magazine) and inside of this type the variants (JHP , AP , cryo , ball) for creating the magazines , for example a Beretta 9mm Magazine you need (this is a part of Mr. Fixit ):
9mm & Empty beretta magazines (can buy this in the most weapons dealers , and in the loot of corpses)
or another magazine of 9mm from different weapons & empty beretta magazines ... (this give you , the empty magazines from the other weapon and the beretta 9mm magazines loaded)
Yeah , i know is a big "list" to mr fixit , for this , i create a "set" of reloading tools with each type of ammo (9mm has their proper tool for convert and change all the weapons with a own version of Mr.Fixit with the exclusive list) and this tools can find easy around the shops...
The only thing i need to do is create the possibilty to reload the weapon using other type of ammo (mr fixit can´t be oppened in the combat)

In other ways ... what is the file i need to modify for change the reload times ? is in the proto or in script ?
 
Back
Top