STEAM GROUP
State of Decay Modding Crew SoDModding
STEAM GROUP
State of Decay Modding Crew SoDModding
13
IN-GAME
157
ONLINE
Founded
22 September, 2013
Language
English
BIZ 7 Oct, 2013 @ 10:13pm
Lets talk about the EXTRA/UNUSED guns
hey there, just found your steam group figured I would share what I am investigating.

So there seem to be a bunch of extra weapon scripts just lying about in gamedata.pak folder that aren't being used in game (I'm cross referencing with other .xml).

here is a quick list (possibly incomplete)

AssaultRifles: FAL, G36, RFB Carbine, L85A1
MachineGuns: M1918A2 (BAR), RPK
Pistols: 84 Wildcat, Automag, Fifty-Seven, G31, G32, G33, Hi-Power, Mi.Le .45, P 226 Sg, P229-40, PP 22 (Walther)
Revolvers: Anvil Hammer (Elite), Mark VI, SP 101
Rifles: 464 Brushgun, .45 Justice, L41A1 Cadet, Lenfield No. 4, M107 Elite (Barrett .50 Cal), RC 40
Shotguns: 590 SP, Model 1897, A12 Custom, Coachgun, Double Short, TS 15 (UTS-15?),
SMGs: M.P90B/M.PS90B (BlackOps?), M3A1 (Grease Gun), MPX (Sig), Mark.Y 90 (P90?), UMP Pro (Ump_elite)

Now I haven't checked them all but the ones I have seem to have most of the assets included (model,mats,icons). So assuming we can add them in, how do you think we would go about testing in game?

Anybody got the magic give weapon console command??
Last edited by BIZ; 7 Oct, 2013 @ 10:13pm
< >
Showing 1-8 of 8 comments
_________LuNandor 9 Oct, 2013 @ 12:29am 
First, I'd say that those are probably from the core engine so there probably isn't much reason we wouldn't be able to enable them.

I do have the core list of codes(with a bunch of extra junk code) in a file. Or you can open up the exectuable with a notepad or something and look around :) Have been working on redoing the 3D model for the church base so i haven't had time to do any other fun stuff :)

Thexsadow on the SoD forums said they got the console working but didn't say how.
Lumpie 9 Oct, 2013 @ 4:23am 
I have found and installed the crossbow:
Path: State of Decay\Game\scripts\entities\items\xml\weapons

This has to stop otherwise it will not work.

<item name="Rifle_750_Forester" class="Weapon" category="rifle" priority="3">
<ai_descriptor handler="instant" burstBulletCountMin="1" burstBulletCountMax="2" draw_time="0.35"
sweep_width="-1" sweep_frequency="-1" burstPauseTimeMin="0.5" burstPauseTimeMax="1.5" singleFireTriggerTime="0.5" />

You can replace with any firearm.

Here the source text:
<---Here you can change the Text -->

<params>
<param name="giveable" value="1" />
<param name="selectable" value="1" />
<param name="pose" value="rifle" />
<param name="mass" value="0" />
<param name="canHaveSilencer" value="0" />
<param name="disturbanceValue" value="5.0" />
<param name="soundRange" value="3.0" />
<param name="soundRangeSilenced" value="0.0" />
<param name="display_name" value="750 Forester"/>
<param name="ammoMax" value="150" />
</params>

<geometry>
<firstperson name="objects/weapons/rifle/rifle_750forester/rifle_750forester.cgf"/>
<thirdperson name="objects/weapons/rifle/rifle_750forester/rifle_750forester.cgf"/>

</geometry>

<actions>
<action name="select">
<animation target="owner" name="select"/>
</action>
<action name="deselect">
<animation target="owner" name="deselect"/>
</action>

<action name="fire">
<sound target="player" name="Sounds/weapons:wpn_common:dryfire" radius="50" static="0"/>
<sound target="player_reverb" name="sounds/weapons:wpn_rifle:22_fire_sup_rvrb" radius="50" static="0"/>
<sound target="npc" name="Sounds/weapons:wpn_common:dryfire" radius="50" static="0"/>
</action>
<action name="fire_jammed">
<sound target="player" name="Sounds/weapons:wpn_common:jammed" radius="20"/>
<sound target="npc" name="Sounds/weapons:wpn_common:jammed" radius="20"/>
</action>
<action name="fire_silenced">
<sound target="player" name="sounds/weapons:wpn_rifle:308_fire_sup" radius="50" static="0"/>
<sound target="player_reverb" name="sounds/weapons:wpn_rifle:308_fire_sup_rvrb" radius="50" static="0"/>
<sound target="npc" name="sounds/weapons:wpn_NPC_rifle:308_NPC_fire_sup" radius="50" static="0"/>
</action>

<action name="reload_start">
<animation target="owner" name="reload_start"/>
</action>
<action name="reload_load">
<animation target="owner" name="reload_load"/>
</action>
<action name="reload_end">
<animation target="owner" name="reload_end"/>
</action>

<action name="unjam_start">
<animation target="owner" name="unjam_start"/>
</action>
<action name="unjam_work">
<animation target="owner" name="unjam_work"/>
</action>
<action name="unjam_end">
<animation target="owner" name="unjam_end"/>
</action>

<action name="empty_clip">
<sound target="player" name="Sounds/weapons:wpn_common:dryfire" radius="20"/>
<sound target="npc" name="Sounds/weapons:wpn_common:dryfire" radius="20"/>
</action>
<action name="change_firemode">
<sound target="player" name="sounds/weapons:wpn_common:firemode" radius="20"/>
</action>
</actions>

<audio>
<player>
<param name="precacheAudioFile" value="wpn_rfl_308"/>
<events>
<event name="roundin" output="Sounds/weapons:wpn_common:jammed"/>
<event name="roundinbarrel" output="Sounds/weapons:wpn_common:dryfire"/>
</events>
</player>
<npc>
<param name="precacheAudioFile" value="wpn_rfl_308_npc"/>
<events>
<event name="roundin" output="Sounds/weapons:wpn_common:jammed"/>
<event name="roundinbarrel" output="Sounds/weapons:wpn_common:dryfire"/>
</events>
</npc>
</audio>

<firemodes>
<firemode type="default">
<fire>
<param name="ammo_type" value="bullet_22cal"/>
<param name="rate" value="900"/>
<param name="reload_time" value="5.0"/>
<param name="bullet_chamber" value="0"/>
<param name="clip_size" value="5"/>

<param name="damage" value="400"/>
<param name="damage_drop_min_distance" value="32"/>
<param name="damage_drop_per_meter" value="15.0"/>

<param name="helper_tp" value="weapon_term"/>
<param name="nearmiss_signal" value="OnNearMiss"/>
</fire>

<recoil>
<!-- each shot moves this amount along the x and y axes, measured from 5m -->
<attack_base>
<param name="x" value="0.0"/>
<param name="y" value="0.028"/>
</attack_base>

<!-- randomness -->
<attack_rand>
<param name="nx" value="-0.016"/>
<param name="x" value="0.016"/>
<param name="ny" value="-0.02"/>
<param name="y" value="0.02"/>
</attack_rand>

<!-- additional randomness for high rate -->
<attack_rand_high>
<param name="threshold_timeslice" value="0.2"/>
<param name="threshold_shots" value="1"/> <!-- if shots fired in the last timeslice crosses the threshold use high recoil randomness. -->
<param name="nx" value="-0.04"/>
<param name="x" value="0.04"/>
<param name="ny" value="-0.004"/>
<param name="y" value="0.08"/>
</attack_rand_high>

<!-- times -->
<param name="time_fadein" value="0.001" />
<param name="time_hold" value="0.2" />
<param name="time_fadeout" value="0.16"/>

<!-- multipliers -->
<param name="recoil_jump_m" value="1.5" />
<param name="recoil_crouch_m" value="0.5" />
<param name="recoil_sprint_m" value="1.2" />
<param name="recoil_runandgun_m" value="0.5"/>
</recoil>

<!-- If you don't want your gun to be super-accurate this adds some spread -->
<spread>
<param name="min" value="0.0"/>
<param name="max" value="0.0"/> <!-- max radius at 5m -->
<param name="attack" value="0.0"/> <!-- spread per shot -->
<param name="decay" value="0.0"/> <!-- time from max to min -->

<!-- movement modifier -->
<param name="speed_threshold" value="1.0"/> <!-- movement speed over this adds spread -->
<param name="speed_m" value="0.00"/> <!-- movement times this is added to spread -->

<param name="rotation_threshold" value="1.0"/> <!-- rotation over this add spread -->
<param name="rotation_m" value="0.00"/> <!-- rotation times this is added to spread -->

<!-- multipliers -->
<param name="spread_jump_m" value="1.5" />
<param name="spread_crouch_m" value="0.85" />
<param name="spread_sprint_m" value="1.2" />
<param name="spread_runandgun_m" value="1.0" />
</spread>



</firemode>
<firemode name="Single" type="Single">
<tracer>
<param name="geometryFP" value="objects/effects/tracer_standard_new.cgf" />
<param name="geometry" value="objects/effects/tracer_standard_new.cgf" />

<param name="effectFP" value="weapon_fx.tracer.standardfp" />
<param name="effect" value="weapon_fx.tracer.standard" />
<param name="speed" value="375" />
<param name="speedFP" value="1100" />
<param name="frequency" value="1"/>
<param name="helper_fp" value="weapon_term"/>
<param name="helper_tp" value="weapon_term"/>
</tracer>
<outofammotracer>
<param name="effectFP" value="weapon_fx.tracer.standardfp" />
<param name="effect" value="weapon_fx.tracer.standard" />
<paran name="speed" value="375" />
<param name="speedFP" value="1100" />
<param name="frequency" value="2"/>
<param name="helper_fp" value="weapon_term"/>
<param name="helper_tp" value="weapon_term"/>
</outofammotracer>
<fire>
<param name="tracer_treshold" value="5"/>
<param name="auto_fire" value="false"/>
</fire>
</firemode>
</firemodes>

<accessories>
<accessory name="Silencer">
<attach helper="silencer_attach" layer="silencer"/>
<detach/>

</accessory>
</accessories>
</item>
Well done :) Though I'll be curious about enabling the ammo showing up in containers
Maxunit 9 Oct, 2013 @ 9:31am 
I'm a bit confused by the instructions on how to enable the crossbow...

What do you mean with "This has to stop?" This part needs to be removed/deleted?
BIZ 9 Oct, 2013 @ 5:43pm 
Dunno I'm guessing he replaced one of the existing weapons (750 forester in this case) with the crossbow?

The gun definitions file is in the libs folder -> libs/class3/items/items.xml
This is where I would guess you could 'add' stuff in. Unfortunately it has a encrypted counter part so no luck making changes. :(

weapon icon entries are stored here - libs/class3/icons/inventoryicons.xml
Last edited by BIZ; 9 Oct, 2013 @ 5:44pm
I didn't analyze/attempt to enable it, I'm too busy with my 3D modelling - if someone figures it out, feel free to post it here :)

Good calls BIZ
Skarphedinn 12 Oct, 2013 @ 2:53pm 
Originally posted by G-Survivor:
http://www.youtube.com/watch?v=Dbf8_E2cIhw&feature=em-upload_owner

Could you upload that SWAT-type skin?
< >
Showing 1-8 of 8 comments
Per page: 1530 50