Hi, neitys.
Sorry for the late reply. ModDB doesn't seem to be giving me notifications for comments, but still does DM's, thankfully. :D
As for your query, the %=give_item(item_name)% function would go in any .ltx file that can be found in:
- gamedata/config/scripts/LEVEL NAME (for SoC, plus mods that are based on this)
OR
- gamedata/configs/scripts/LEVEL NAME (for CS, CoP and mods based on these)
In both cases, LEVEL NAME would be the game's internal name for your desired level (i.e. k00_marsh for the Swamps in CS, etc. - most of them are easy to recognise).
Furthermore, in the %=give_item(item_name)%, just substitute item_name with the item that you want to spawn, like wpn_ak74 for the AKM-74/2 and the game will spawn it for you when you boot it up.
For spawning multiple items, I'd go with something like:
%=give_item(wpn_ak74) =give_item(wpn_mp5)%
**as an example
It'd be best to add an info portion (a string or bit of text for the game to remember) so it's not constantly filling up your inventory with AK's. For instance:
After on_info =, you might put
{-neitys_has_a_gun} %=give_item(wpn_ak74) +neitys_has_a_gun%
By doing this, the game would check if it's been given the neitys_has_a_gun info portion. If it hasn't, hence the "-" minus beforehand, it will give you the gun, then the game would be given the neitys_has_been_given_a_gun info portion, hence the "+" plus where it's shown a second time, which would prevent it from spamming your inventory with AK's.
EDIT: Something I forgot to mention. If you do plan on adding more info portions for your game or mod to remember, make sure the game knows what the info portion is beforehand. To do this, you'd need to go to gamedata/configs/gameplay to find .xml file (similar to .ltx ones, can be opened in notepad, etc.). Copy and paste any info portion from any of the .xml files that handle these (i.e. info_escape.xml, or something similar - this one, for instance, handles info portions in the Cordon, though the game can read any of them regardless of which level they are used in), add it to the bottom of the document and substitute the info portion text with whatever you want to name your new info portion (i.e. neitys_has_a_gun from earlier would be fine). Doing this would prevent the game from crashing and giving you an error saying that it doesn't know what your new info_portion is. Also, don't forget that SoC and mods based on this game (to my knowledge) use a config folder rather than a configs folder.
I hope this all helps. I might've included a tad bit too much info, but just some extra bits and pieces incase you get stuck. Shoot me a DM if you need any more help. I've been dealing with .ltx script files for a good while now. They took quite some time to get my head around, but I'd be pleased to help you further if you need anything.
Happy hunting, stalker!
Jacob_MP.
Jacob_MP
joined
Hello. I like to mod video games. │ Twitter: ModdersPlaygro1 │ YouTube: Modder's Playground │ As for any of the mods that I release, feel free to adapt them to your liking or tweak them to make them better. I just want the modding community to thrive for as long as possible. That's what keeps many of our favourite games alive. All of my mods are only released in English; translations and adaptations are welcome. DM's open.