![]() ![]() |
Dec 1 2005, 08:54 PM
Post
#1
|
|
![]() Chief UFO Modder ![]() ![]() ![]() ![]() Group: Honoured Posts: 3882 Joined: 28-October 05 From: Twilight Zone Member No.: 1316 |
I've been trying to add a sniper scope (visor) slot to the Desert Eagle. I copied the following from the record for the MSG90:
CODE ;receptacle PTR 1 Receptacle Recepts RECORD inventorypanel STR "Weapon" ListOfReceptPoint ARRAY 2 INT 1;"Classic muzzle" INT 22;"Sniper scope" END_OF_ListOfReceptPoint END_OF_Recepts ... yet I cannot get the visor slot to show up. Does anyone know what I've overlooked? Has anyone been able to successfully add a slot of any sort to any weapon? (I just noticed that the underbarrel slots I thought I'd added to 2 of the SMGs also don't show up.) -------------------- |
|
|
|
Dec 2 2005, 01:40 AM
Post
#2
|
|
|
Member ![]() ![]() Group: Members Posts: 132 Joined: 31-October 05 Member No.: 1395 |
After a bit of playing around i found the following
you can swap the existing hardpoint for any other ie replace the muzzle with a sniper scope but as you found putting 2 on just gives you the first so i got to thinking what could stop you adding more. 1st port of call was the model files but for the desrt eagle the model file seems to have info for all 3 of the main hardpoint types. So i abandoned that as being a restriction. Next port of call was the Savegame file where i came accross this StoreItem RECORD count INT 8 shipped INT 0 wasStored BOOL TRUE Item Item RECORD itemTemplateStringId STR "Desert Eagle" Blah Blah itemReceptacle ItemReceptacle RECORD items PARRAY 1 PTR 0 END_OF_items END_OF_ItemReceptacle Blah Blah My guess is that this bit the PARRAY 1 is restricting you from having more than 1 addon for the weapon. This is the entry for a XM8 which has all 3 slots itemReceptacle ItemReceptacle RECORD items PARRAY 3 PTR 0 PTR 0 PTR 0 END_OF_items END_OF_ItemReceptacle Its late for me and dont have time at the moment to test it but perhaps this is initialised at start of game from the equipment.txt file. So to test it either start a new game with your mod or edit a copy of your save apply mod and test. Good luck Edit: Stayed up and tried it and are now the proud owner of a desert eagle with sniper scope, underbarrel laser scope and accelerator |
|
|
|
Dec 2 2005, 02:29 AM
Post
#3
|
|
![]() Chief UFO Modder ![]() ![]() ![]() ![]() Group: Honoured Posts: 3882 Joined: 28-October 05 From: Twilight Zone Member No.: 1316 |
Thank you very much, oh wise avatar! I just editing my last save and voila, success.
I'd like to point out to anyone else who wishes to do this that if you have a weapon in a soldier's possession already (ie: not in the general inventory) that you need to do this to, decompose the weapon and return it to inventory first. Then save the game, exit UFO, and edit the savegame. That way all the weapons of the same type get lumped together and you don't have to go hunt for each particular instance of it. -------------------- |
|
|
|
Dec 2 2005, 06:02 PM
Post
#4
|
|
|
Member ![]() ![]() Group: Members Posts: 132 Joined: 31-October 05 Member No.: 1395 |
Just a thought for those people who wont want to mod there savegame file.
You could create a duplicate version of the weapon in the equipment.txt file that has the addon modifications which would enable people to manufacturer a "new" variant of the weapon which would have access to the modded addon slots. Additionally if you create some "dummy" addon type for each hardpoint you would be able to give all new weapons you include the ability to have the addon slots modded at a later date. This will make future changes compatable with existing save games. Just a few thoughts for you. |
|
|
|
Dec 2 2005, 06:05 PM
Post
#5
|
|
![]() Chief UFO Modder ![]() ![]() ![]() ![]() Group: Honoured Posts: 3882 Joined: 28-October 05 From: Twilight Zone Member No.: 1316 |
A nice idea, Avatar, but I'm too lazy (and having too much fun playing AS) to do that.
-------------------- |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 8th September 2010 - 07:31 PM |