DayZ
Solar Panel Power System
llmonmonll 2021 年 12 月 15 日 上午 3:03
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.
最后由 llmonmonll 编辑于; 2021 年 12 月 15 日 上午 3:07
< >
正在显示第 1 - 5 条,共 5 条留言
Old_Wild_Lynx 2022 年 12 月 21 日 下午 8:18 
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>
最后由 Old_Wild_Lynx 编辑于; 2022 年 12 月 21 日 下午 8:18
llmonmonll 2022 年 12 月 21 日 下午 11:49 
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.
Dances With Zombies 2023 年 5 月 5 日 上午 7:03 
引用自 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 2023 年 5 月 21 日 下午 3:18 
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 2024 年 12 月 11 日 下午 6:22 
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?
< >
正在显示第 1 - 5 条,共 5 条留言
每页显示数: 1530 50