• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Server side PREFAB mods?

ErrorNull

Refugee
Is it possible to make a mod that is completely server side for the XML files within the PREFABS folder?

I am interested in modifying the XML files related to a number of POI/prefabs and hope to not require friends who join my server to have to do any legwork to see the modification.

Possible?

 
I am under the impression that prefabs in mods will sync from the server like XML does. I’m not sure when that was introduced, but I think it was pretty recently. I don’t have a server to test that with but that’s what I read somewhere on the forums.

im also not sure if you made changes to prefabs that were already set down on a new RNG map, if the changes you made would actually take effect when the chunks those prefabs were in were first uncovered, but I am also under the impression that any existing “discovered” chunks which the prefabs in the before you made changes would not contain the changes. 

 
Last edited:
They will, you will just lose out on distant terrain, since it's not actually sending the files to you, it's just building the world based on what prefabs the SERVER has.

 
The server pushes prefabs to the client? That's news to me. Do either of you have some kind of "official" source for this, or was it discovered by accident?

I'm wondering if other stuff is pushed to the client now, that I don't know about. (I never play MP so I wouldn't know from experience.)

 
No, this is not what Guppycur said. The prefab would be sent to the client as part of the generated RWG world, i.e. as blocks in the RWG world data. Reseting for a quest is also done on the server and simply removes any changes stored in the save game, again no data needed in the client.

The question is for what the prefab data is needed in the client at all. According to Guppycur only for distant terrian view.

Possibly the debug information, like the info in which prefab you are standing at the moment, might also need the prefab data to be in the client ?

 
Last edited by a moderator:
No, this is not what Guppycur said. The prefab would be sent to the client as part of the generated RWG world, i.e. as blocks in the RWG world data.


Oh, I didn't know that's how it worked. That does make sense.

I can also see why the distant terrain view would not be sent - the "imposter" data is part of the POI itself, not part of the blocks. Though, I would imagine that's going to change with A20 and the dynamic imposter feature.

 
interesting. thanks for the insight.

so i experimented with creating a new mod called "enPrefabs". i created the folder called enPrefabs in the Mods folder. Within enPrefabs folder i created the required ModInfo.xml and created another folder called "Prefabs". Within that folder I created a file called abandoned_house_01.xml. my intention is to make some zombie spawning tweaks for that POI.

So the file path is:

Mods / enPrefabs / Prefabs / abandoned_house_01.xml

within that xml file i entered the following and nothing more:

<ErrorNull>

<set xpath="/prefab/property[@name='SleeperVolumeGroup']/@value">S_-S_Zom_Businessman,1,1,S_-S_Zom_Businessman,1,1,S_-S_Zom_Businessman,1,1</set>

</ErrorNull>




when i run the game, the sleepers within this POI did not change to that businessman group. it simply remained the default assigned zombies for that POI.

so is what i'm attempting possible?

 
Last edited by a moderator:
interesting. thanks for the insight.

so i experimented with creating a new mod called "enPrefabs". i created the folder called enPrefabs in the Mods folder. Within enPrefabs folder i created the required ModInfo.xml and created another folder called "Prefabs". Within that folder I created a file called abandoned_house_01.xml. my intention is to make some zombie spawning tweaks for that POI.

So the file path is:

Mods / enPrefabs / Prefabs / abandoned_house_01.xml

within that xml file i entered the following and nothing more:

<ErrorNull>

<set xpath="/prefab/property[@name='SleeperVolumeGroup']/@value">S_-S_Zom_Businessman,1,1,S_-S_Zom_Businessman,1,1,S_-S_Zom_Businessman,1,1</set>

</ErrorNull>




when i run the game, the sleepers within this POI did not change to that businessman group. it simply remained the default assigned zombies for that POI.

so is what i'm attempting possible?


AFAIK XPath only works in the modlet's Configs folder, so I don't think what you want to do is possible.

You might be better off just making a copy of the POI, name it something different, and adjust the spawning as you normally would for any custom POI. Then, replace the vanilla POI with your custom POI in rwgmixer.xml. It wouldn't do anything for pre-generated maps, but it would work for RWG.

EDIT: You would have to put all the prefab's files to the Prefabs folder, not just the XML file. You could probably guess that, but I wanted to be clear.

 
Last edited by a moderator:
AFAIK XPath only works in the modlet's Configs folder, so I don't think what you want to do is possible.

You might be better off just making a copy of the POI, name it something different, and adjust the spawning as you normally would for any custom POI. Then, replace the vanilla POI with your custom POI in rwgmixer.xml. It wouldn't do anything for pre-generated maps, but it would work for RWG.

EDIT: You would have to put all the prefab's files to the Prefabs folder, not just the XML file. You could probably guess that, but I wanted to be clear.
ah ok. that's what i figured. thanks for the clarification @khzmusik

i'm avoiding any modification method that requires the client player to manually download files.. so doing the above will be set aside for next time. there's plenty of server side only changes that i can play with.

 
Back
Top