Jump to content

Beginner xml modding tutorials


xyth

Recommended Posts

  • xyth pinned this topic
  • 6 months later...
  • 1 month later...
  • 6 months later...

Well,  when you kill a zombie - an "Exp" figure, (example "400", or "750") pops up at the bottom-right corner of your screen - right?  That figure comes from the "entityclasses.xml" file, which is where all of the default Player and Zombie properties are defined, and you will find it under <entity_class name="zombieTemplateMale">,  the actual Experience value defined here:  <property name="ExperienceGain" value="400"/>. The "400" is the number of experience points which your character will receive, so that you can gain a Skill Point and thereby be able to advance in the game. I would not advise changing that line, as it could have a drastic impact on your game. However - if you want a few Dukes as well - note that under that line is "<property name="LootDropProb" value=".02"/>  (Whether it drops a loot bag on death or not.) .

Modding the Loot Bag system is a bit complicated, so an easier way is by simply making the Dukes part of zombies "Harvest" - just chop up the carcass and get some bone, Dukes and whatever else you "need" manually. You could  easily make a mod or add one, like the lines below - and add it to an existing entityclasses.xml mod. The Harvesting lines below, are all you need. Change them as you wish:

/Mods/MyMod/Config/entityclasses.xml
<configs>

        <append xpath="/entity_classes/entity_class[contains(@name, 'zombie')]">
                <drop event="Harvest" name="foodRottingFlesh" tag="butcherHarvest" count="8"/>
                <drop event="Harvest" name="resourceAnimalFat" tag="butcherHarvest" count="3"/>

                 <drop event="Harvest" name="casinoCoin" tag="butcherHarvest" count="200"/>  <----------------   This one will drop your Dukes. . . . .
                <drop event="Harvest" name="resourceBone" tag="butcherHarvest" count="5"/>
                <drop event="Harvest" name="resourceBone" tag="allToolsHarvest" count="2"/>            
    </append>
</configs>


To use the Loot Bag method:-
entityclasses.xml and the loot.xml

You could look at the <property name="LootDropProb" value=".02"/>  as this will indicate whether it drops the yellow loot bag on death or not, and then note the <property name="LootDropEntityClass" value="EntityLootContainerRegular"/> below that line. It points to the EntityLootContainerRegular line in the Loot.xml, and from there - the lootgroup(s) that might be dropped. You could do what you want by adding the Dukes into those lootlists, instead of the Harvest method above - but it's quit a bit more work and testing..

Just some suggestions.... others will have perhaps better ideas?

pj  👍

 

 

 

Edited by paulj_3 (see edit history)
Link to comment
Share on other sites

I would like to set up gaining experience not for killing a zombie, but the amount of damage done to it. So for example, 100 damage = 5 experience and also add 5 coins to the player's pocket immediately. But I understand that here it is necessary to work not through xml, but with the help of C#

 

Maybe ?

Link to comment
Share on other sites

  • 2 weeks later...
On 9/1/2022 at 3:12 AM, v3lt3r said:

I would like to set up gaining experience not for killing a zombie, but the amount of damage done to it. So for example, 100 damage = 5 experience and also add 5 coins to the player's pocket immediately. But I understand that here it is necessary to work not through xml, but with the help of C#

 

Maybe ?

 

You should not ask questions like this in this thread. It is better if you create your own thread in the "Discussion and Requests" forum. But to sort of answer your question, yes, that's going to need C# programming, and it probably wouldn't be simple.

Link to comment
Share on other sites

  • 1 month later...

 

Edit in my post management.

Create your own 3D model
What to do on the server side is
impossible
It looks like

--
post before editing
--
please tell me. 

Call the 3D prefab file xml text uploaded to the server in-game. 

Note that you can call icons.

--

please tell me.

uploaded to the server

3D prefab file

xml text in game.

In addition, call the icon

I confirm.

Edited by a_jp
Create your own 3D model What to do on the server side is impossible (see edit history)
Link to comment
Share on other sites

  • 5 months later...

These are all commands covered:

  • append
  • set
  • replace
  • insertAfter
  • insertBefore
  • remove
  • removeAll
  • addIfMissing
  • setIfMissing
  • addIfNotPresent
  • removeIfPresent
  • removeIfAny
  • selectSingleNode
  • selectNodes

Now I have some idea of how to use each of these, however, this is rather limiting compared to what I would be able to do with the full functionality of XPath. I was using the XPath 3.1 WWWC specifications, guides, and such. There's a lot more that XPath could do if it weren't limited to those commands.

 

Still, I think I'm pretty invested now. I'll try creating a simple Java program with a simple UI that takes XML as input and spits out an XML with these XPath commands.

Link to comment
Share on other sites

  • 1 month later...

hi! not a modder, but a poi creator.

I have an idea I want to implement with speakers but the base game lacks functionality on speakers to add them as triggers with duration in the level editor. 

basically I want to have the loud speaker go off when a volume is triggered. Can anybody guide me?

 

Link to comment
Share on other sites

  • 8 months later...

 Does anyone know of or have a full XML wiki of all the items, classes, objects and elements inside 7 Days to Die? I'm trying to write my own mods in Unity and create companion XML files that function in the games established framework. 

 

Anyone?🤓 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...