DayZ
Solar Panel Power System
llmonmonll 15 Dec, 2021 @ 3:03am
Types file for loot spawning
<?xml version="1.0" encoding="utf-8"?>
<types>
<type name="RFSolarPanel">
<nominal>0</nominal>
<lifetime>3888000</lifetime>
<restock>0</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
</type>
<type name="RFSolarPanelKit">
<nominal>15</nominal>
<lifetime>172800</lifetime>
<restock>0</restock>
<min>10</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools" />
<usage name="Military" />
<value name="Tier3" />
<value name="Tier4" />
</type>
</types>

<nominal></nominal>
<min></min>
with a value of your choice.
After that, you can set the spawn location to
<usage ... or later.

Excellent mod !
I have been using it for a long time. I will use it for a long time.
Thanks a lot.
Last edited by llmonmonll; 15 Dec, 2021 @ 3:07am
< >
Showing 1-5 of 5 comments
Old_Wild_Lynx 21 Dec, 2022 @ 8:18pm 
This, in my opinion, is more correct.
Ready to add to the bottom of the server's "types.xml".

<!-- Solar-Panel-Power-System -->
<type name="RFSolarPanel">
<lifetime>3888000</lifetime>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
</type>
<type name="RFSolarPanelKit">
<nominal>18</nominal>
<lifetime>172800</lifetime>
<restock>1800</restock>
<min>12</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
<category name="tools"/>
<usage name="Industrial"/>
<usage name="Town"/>
</type>
Last edited by Old_Wild_Lynx; 21 Dec, 2022 @ 8:18pm
llmonmonll 21 Dec, 2022 @ 11:49pm 
You can either add it to the bottom of types.xml in the db folder or create a new file and load the newly created file with cfgeconomycore.xml.
Originally posted by llmonmonll:
You can either add it to the bottom of types.xml in the db folder or create a new file and load the newly created file with cfgeconomycore.xml.

...

QUESTION:

what is the syntax for using the modular approach?

thanks in advance.
Old_Wild_Lynx 21 May, 2023 @ 3:18pm 
HI.
The syntax would be this.
In ^cfgeconomycore^, at the bottom, add these strings:

<economycore>
<classes>
.
.
.
.
.
<ce folder="Mods">
<file name="typesXXX.xml" type="types" />
<file name="typesSolarPanelPowerSystem.xml" type="types" />
<file name="typesYYY.xml" type="types" />
<file name="typesZZZ.xml" type="types" />
<file name="cfgspawnabletypesXXX.xml" type="spawnabletypes" />
</ce>
</economycore>

The "types" files if you only have a "unitary" spawn (single pieces), you can add the "cfgspawnabletypes" files if you have "complex" spawns (objects with attachments inside to select, like accessories on weapons).
In the mission folder "...\mpmissions\dayzOffline.chernarusplus" add a "Mods" folder (but you can call it whatever you want, as long as the name is the same in all its references).
Inside that "Mods" folder you add the various files "typesXXX.xml", "typesYYY.xml", "typesZZZ.xml" and "cfgspawnabletypesXXX.xml" formatted from start to finish as unique files, and each one for its own mod .
Upon reboot everything should work as intended. In the case of an update, of course, you have to review all the files, but having separated them, each one will have its own story. That is, with a new patch, you will have a new "types", but it won't change the mods one. If the "cfgeconomycore" also changes in the new patch, until you re edit it, you will lose all mods.
In short, advantages and disadvantages also for this solution, there is no "The Solution" right for everything.
In my opinion, for 2/3 "simple" mods it's not worth it. Add the typi to the end of the "types.xml" file and it's much faster.
If you have a server with many mods and some even complex and articulated ones, then this additional work certainly has its advantage, but immediately take into account that the more complex the system you use, the more complex the maintenance will be and the more risk you will have of "errors and omissions".
Good job, that DayZ is already a "madhouse" of her ... ;-)
And, sorry for my bad English but I must use Google.
Arcturus 11 Dec, 2024 @ 6:22pm 
Good evening, i ran into a issue. Ive tried reinstalling solar panels several times with only one plug working at any given point. Any ideas why that's happening?
< >
Showing 1-5 of 5 comments
Per page: 1530 50