I need help with modding
Posted: Sun Jun 26, 2016 2:42 pm
i started making resource pack named Cyka Blyat but, when i rename items they do not spawn on subs is there way to fix that?
ok thanks for help. one more question:Regalis wrote:The items are saved and loaded based on the name of the item, so if you rename an item (instead of creating a new one with the new name), all of those items will disappear from the existing subs.
You could either edit the submarines and add some of those new items manually, or open the submarine file in a text editor and change the names with find and replace. The file is a normal gzip archive, and you should be able to extract it if you change the file extension to .gz. After that you can edit the file in something like notepad (it's an xml file similar to the item configuration files). Once you're done, you can recompress it back to a gzip archive.
Those "type" attributes are used for determining when to apply some sort of effect. There are a few types to choose from, but OnWhat is not one of them - here's a list of the types:etet2 wrote:in most of your items you use type="OnUse"/> i want make sound when on pickup item. it will be type="OnWhat"/>.
Code: Select all
<StatusEffect type="OnPicked" target="This" sound="Content/Items/SomeSound.ogg"/>
If you post the .xml file I can take a look!etet2 wrote:also i do not know why that happens but when i put custom .ogg sounds game does not play them
But why harpoon uses notRegalis wrote:Those "type" attributes are used for determining when to apply some sort of effect. There are a few types to choose from, but OnWhat is not one of them - here's a list of the types:etet2 wrote:in most of your items you use type="OnUse"/> i want make sound when on pickup item. it will be type="OnWhat"/>.
Always: self explanatory
OnPicked: when a player highlights the item and presses E
OnUse: this works a bit differently depending on the ItemComponent, but usually it corresponds to left clicking while an item is equipped
OnWearing: self explanatory?
OnContaining: when an ItemContainer has some specific item inside it (see reactor.xml for example)
OnContained: when the item is contained inside some other item
OnActive: depends on the ItemComponent, but usually means that the item is turned on and has enough power
OnFailure: when a character with insufficient skills tries to use the item
OnBroken: when the condition of the item goes to zero (i.e. when the item breaks)
OnFire, InWater: self explanatory?
OnImpact: when the item hits something hard enough (the impacttolerance attribute of the item element determines how hard is "hard enough", see Nitroglycerin in explosives.xml)
Something like this would work for playing a sound when the item is picked up:Code: Select all
<StatusEffect type="OnPicked" target="This" sound="Content/Items/SomeSound.ogg"/>
SpoilerIf you post the .xml file I can take a look!etet2 wrote:also i do not know why that happens but when i put custom .ogg sounds game does not play them
Code: Select all
<StatusEffect type="OnPicked" target="This" sound="Content/Items/SomeSound.ogg"/>
Code: Select all
<Sound file="harpoon1.ogg" type="OnUse"/>
<Sound file="harpoon2.ogg" type="OnUse"/>
That's just another way of configuring the sounds, one that I've been meaning to replace with those "StatusEffect" sounds: with them you can configure different sorts of conditions for when the sound should play (for example if there's some specific item inside the item).etet2 wrote:But why harpoon uses notbut,Code: Select all
<StatusEffect type="OnPicked" target="This" sound="Content/Items/SomeSound.ogg"/>
Code: Select all
<Sound file="harpoon1.ogg" type="OnUse"/> <Sound file="harpoon2.ogg" type="OnUse"/>
i have texture for item but i do not understand how to put texture on itemsRegalis wrote:That's just another way of configuring the sounds, one that I've been meaning to replace with those "StatusEffect" sounds: with them you can configure different sorts of conditions for when the sound should play (for example if there's some specific item inside the item).etet2 wrote:But why harpoon uses notbut,Code: Select all
<StatusEffect type="OnPicked" target="This" sound="Content/Items/SomeSound.ogg"/>
Code: Select all
<Sound file="harpoon1.ogg" type="OnUse"/> <Sound file="harpoon2.ogg" type="OnUse"/>
Code: Select all
Sprite texture ="vodka.png" sourcerect="363,996,1,3" depth="0.6"/>
It's "x,y,width,height". The units are in pixels and 0,0 is the upper left corner of the texture.etet2 wrote:i have texture for item but i do not understand how to put texture on itemssourcerect is x,y,x,y? or what?Code: Select all
Sprite texture ="vodka.png" sourcerect="363,996,1,3" depth="0.6"/>