UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Adding new wall guns

broken avatar :(
Created 8 years ago
by kaizokuroof
0 Members and 1 Guest are viewing this topic.
2,286 views
broken avatar :(
×
broken avatar :(
Location: au
Date Registered: 9 October 2016
Last active: 5 years ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
×
kaizokuroof's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
kaizokuroof's Contact & Social Links
Hey All,

Apologies if this has already been mentioned or if this is the wrong section.

I'd like to add say a heavy machine gun (Like the BRM). Could anyone help push me in the right direction to doing this? I realise there isn't a chalk outline and can easily make one, but I just need some help locating gun names and where I should start to write the script.

Please let me know if you require further information.

Thanks in advance!
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
I did this with the manowar in my map. First find the gun name (go to the ugx wiki thing).
-Add any wall weapon prefab and add it to the map
-left click and select "enter prefab"
-in the view you will see a red box and a green/brown-ish box
-first shift-click on the red box. Find the kvp line that says the weapon name (ex: ar_accuracy) and replace it with the weapon name of the weapon you want on the wall (for the manowar it is ar_damage)
-press escape and shift-click the green/brown-ish box.
-this is the hard part, you have to find out the name of the worldmodel of the weapon (an easy way is to find the internal name of the weapon using Wraith)then replace it in the kvp where it says something like "wpn_t7_shiva_worldmodel" depending on the weapon prefab you start with (for the manowar it is wpn_t7_mnwr_worldmodel)
-select everything and left-click, prefab, save as new prefab.
-name it whatever
-after you are done select "leave prefab". A window should pop up asking about saving the prefab you used as a base.CLICK DON'T SAVE!
-the prefab should be ready to be used!

Ill make a tutorial later today so you can kinda see how it works
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 3 October 2016
Last active: 8 years ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Zrokz's Groups
Zrokz's Contact & Social Links
I've come to realize there is an error in this method, it works perfect, you have the gun on the wall (The Model), you can buy ammo like a normal wall buy.

prefab > spawnable_weapon_lmg_dingo.map copied from another wallbuy prefab and edited these.

// entity 1
{
guid "{3E2736E2-8C12-11E6-81F6-001BDC0FFAB5}"
"classname" "script_struct"
"angles" "0 360 0"
"origin" "0 0 46"
"target" "auto38"
"targetname" "weapon_upgrade"
"zombie_weapon_upgrade" "lmg_cqb"
"_color" "1 0 0"
}
// entity 2
{
guid "{3E2736E3-8C12-11E6-81F6-001BDC0FFAB5}"
"classname" "script_struct"
"angles" "0 360 0"
"model" "wpn_t7_lmg_dingo_world"
"origin" "0 0 46"
"targetname" "auto38"
"_color" "1 0 0"
}
// entity 3
{
guid "{3E2736E4-8C12-11E6-81F6-001BDC0FFAB5}"
"classname" "script_model"
"model" "wpn_t7_lmg_dingo_world"
"origin" "0 0 46"
"_color" "1 0 0"
"client_server" "ServerSide"
"lightingstate1" "1"
"lightingstate2" "1"
"lightingstate3" "1"
"lightingstate4" "1"
"modelscale" "1"
"shadow_casting" "1"


After you Pack o Punch said gun you have on the wall. The ammo for the wall buy is now by auto 4,500 refill on the wall buy like it should and here's the problem, you can buy it but it doesn't refill your ammo.

so I thought to look at the weapon table which I have made in my > Call of Duty Black Ops III\usermaps\zm_yourmapname\gamedata\weapons\zm\zm_levelcommon_weapons.csv

+

Also stringed in my zone folder > Call of Duty Black Ops III\usermaps\zm_yourmapname\zone_source\zm_youmapname.zone
I added at the bottom
stringtable,gamedata/weapons/zm/zm_levelcommon_weapons.csv

I just used it to change the cost of the guns and add att's but anyways in there is a row for wallbuy_autospawn true or false... but they are all already True.

So if anyone knows how to fix this so when buying ammo for added wall gun pack o punched actually fills you're ammo.

If its scripting something, I don't have a clue. Perhaps its scripting the "targetname" "weapon_upgrade" to some how add these weapon upgrades to the list?


Double Post Merge: October 17, 2016, 02:42:05 pm
Could it be this?

share\raw\scripts\zm\_zm_weapons.gsc

line 833 in the file

function init_spawnable_weapon_upgrade()
{
 
   // spawn_list construction must be matched in _zm_weapons.csc function init() or your level will not load.
   
   spawn_list = [];
   spawnable_weapon_spawns = struct::get_array( "weapon_upgrade", "targetname" );
   spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, struct::get_array( "bowie_upgrade", "targetname" ), true, false );
   spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, struct::get_array( "sickle_upgrade", "targetname" ), true, false );
   spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, struct::get_array( "tazer_upgrade", "targetname" ), true, false );
   spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, struct::get_array( "buildable_upgrade", "targetname" ), true, false );
   
   if ( IS_TRUE( level.use_autofill_wallbuy ) )
   {
      spawnable_weapon_spawns = ArrayCombine( spawnable_weapon_spawns, level.active_autofill_wallbuys, true, false );
   }


if so how I would I use it?
Last Edit: October 17, 2016, 02:42:05 pm by Zrokz
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 3 October 2016
Last active: 8 years ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Zrokz's Groups
Zrokz's Contact & Social Links
I take back everything I said, it is a problem yes, but the problem is ONLY when you've added weapon attachments it seems to conflict somehow. I removed all my weapon attachments and I can now buy pack a punch ammo from wall buy. blah.

 
Loading ...