UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: Wolfplayer on November 30, 2016, 08:30:49 pm

Title: Replace Vending Machines models
Post by: Wolfplayer on November 30, 2016, 08:30:49 pm
Is there a way to change model of the vending machine?
I tried to do it through KVP model, new model appears in the editor but in the game I got original perk machine model.
Title: Re: Replace Vending Machines models
Post by: hajhaka on November 30, 2016, 08:37:08 pm
check the gscs.
Title: Re: Replace Vending Machines models
Post by: MakeCents on November 30, 2016, 09:16:27 pm
I think you can redefine it in the perks gsh, but I haven't tried including the perks gsh, or another other perk script in order to override, in mod or map yet.

For example, in _zm_perk_quick_revive.gsh, you'll see this:

Code Snippet
Plaintext
#define QUICK_REVIVE_MACHINE_DISABLED_MODEL		"p7_zm_vending_revive"

Of course now you'll have to copy that gsh to your map or mod and add it to zone. Not sure if it will work, but that is where it gets the model to set in your _zm_perk_quick_revive.gsc and so on. If it doesn't overwrite it in you map folder, you'll have to create a mod in order to overwrite it.
You could always try to manually override it in the gsc replacing the text where it sets the model, but you could run into the same issue as I just said with the gsh. Sorry, I haven't gotten around to check these yet.
Title: Re: Replace Vending Machines models
Post by: Wolfplayer on December 01, 2016, 09:18:28 am
So, I copied _zm_perk_quick_revive.gsc; _zm_perk_quick_revive.csc and _zm_perk_quick_revive.gsh into my map scripts folder.
In gsh file I did this:
Code Snippet
Plaintext
#define QUICK_REVIVE_MACHINE_DISABLED_MODEL		"p7_crate_wood_vintage"
#define QUICK_REVIVE_MACHINE_ACTIVE_MODEL "p7_crate_wood_vintage"

After that I went to my zone_source folder and opened my .zone file:
Code Snippet
Plaintext
scriptparsetree,scripts/zm/_zm_perk_quick_revive.gsc
scriptparsetree,scripts/zm/_zm_perk_quick_revive.csc
scriptparsetree,scripts/zm/_zm_perk_quick_revive.gsh

In game i got standard model again. Will investigate further.

P.S Maybe it is easier to create a simple script, that will give me the perk, that I can put near model?