rickyralph Posted December 17, 2018 Share Posted December 17, 2018 Hey, I was hoping someone can look at my code and see where I am messing it up? It's a mod to increase traders in RWG, while adding them to the towns and cities. rwgmixer.xml <configs> <!-- Adding Traders to the prefab_rule of each group --> <append xpath="/rwgmixer/prefab_rule[@name='residentialOldGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rule[@name='residentialNewGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rule[@name='commercialGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rule[@name='downtownGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rule[@name='industrialGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rule[@name='ruralGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <!--Changing the min and max for the trader on the Wilderness Group--> <set xpath="/rwgmixer/prefab_rule[@name='wildernessGroup']/prefab_rule[@name='traderGroup']/@min_count">10</set> <set xpath="/rwgmixer/prefab_rule[@name='wildernessGroup']/prefab_rule[@name='traderGroup']/@max_count">14</set> <!--Changing the min and max on allowed trader 1--> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_01']/@min_count">2</set> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_01']/@max_count">4</set> <!--Changing the min and max on allowed trader 2--> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_02']/@min_count">2</set> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_02']/@max_count">4</set> <!--Changing the min and max on allowed trader 3--> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_03']/@min_count">2</set> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_03']/@max_count">4</set> <!--Changing the min and max on allowed trader 4--> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_04']/@min_count">2</set> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_04']/@max_count">4</set> <!--Changing the min and max on allowed trader 5--> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_05']/@min_count">2</set> <set xpath="/rwgmixer/prefab_rule[@name='traderGroup']/prefab[@name='settlement_trader_05']/@max_count">4</set> </configs> Here is the code i did for each trader prefab 1-5 <Prefabs> <set xpath="Prefab/property[@name='AllowedTownships']/@value='city,town,rural,wilderness'">residentialOld,residentialNew,commercial,downtown,industrial,rural,wilderness</set> </Prefabs> Any help would be appreciated. Thanks in advance. Link to comment Share on other sites More sharing options...
Tristam Posted December 18, 2018 Share Posted December 18, 2018 God speed. Link to comment Share on other sites More sharing options...
backdownhipi Posted December 18, 2018 Share Posted December 18, 2018 changing the prefab xml to include the city groups in the zones, as well as allowedtownships for city, town, rural, wilderness. is a great start however you will also need to add the <prefab_rule name="traderGroup"> to the town groups, but in the same format as the skyscrapers, so like this <prefab rule="traderGroup"> notice the space between prefab and rule. also it will have to fit in a 4F by 4F space. if you dont know what that means or how big that is, you may need to research axiom, it was a ... fun... weekend. lol, it im not sure if the trader prefab is 4F by 4F. i know ive seen traders in towns before, i think it was in the valmod or no, WotW, even though that was for 16.4 you should download it explorer the rwg and determine what you need to do to replicate it. it may be worth a shot, to backup your current working folder to a seperate place outside of steam, download a clean install of 16.4 and install WotW and check it out in person, as well as the rwg file, and the xml for the prefabs. that should provide enough info to see what you missed. Link to comment Share on other sites More sharing options...
The-Walking-Dad Posted December 18, 2018 Share Posted December 18, 2018 I think xpath can't target the prefab file, only xml files in the config folder. Link to comment Share on other sites More sharing options...
veveratm Posted December 18, 2018 Share Posted December 18, 2018 any update? can someone do so we can have more traders? that would be amazing Link to comment Share on other sites More sharing options...
three08 Posted December 18, 2018 Share Posted December 18, 2018 Your path is wrong for the appends, this seems to work <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name='downtownGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> Link to comment Share on other sites More sharing options...
FastBurst Posted December 18, 2018 Share Posted December 18, 2018 Also you have to remember too, A16.4 things that generated are based on the Game Seed and size of places. I am pretty sure that still exists in A17. I have tried different seeds and got different results with traders. BUT the best thing with the new system is we have access to the prefabs.xml on the world folders generated and you can just MANUALLY places prefabs with the coords now and have them imported now. Guppycur has a video on how to add them in (prefabs) Link to comment Share on other sites More sharing options...
three08 Posted December 18, 2018 Share Posted December 18, 2018 where is the Prefab xml your trying to change here located? <Prefabs> <set xpath="Prefab/property[@name='AllowedTownships']/@value='city,town,rural,wilderness'">residentialOld,residentialNew,commercial,downtown,industrial,rural,wilderness</set> </Prefabs> Link to comment Share on other sites More sharing options...
rickyralph Posted December 19, 2018 Author Share Posted December 19, 2018 Thanks for all the comments, super helpful and sorry for the late replies, really new to the forum and thought i would get a message when people replied to my threads but i never did (or i missed them, very likely). changing the prefab xml to include the city groups in the zones, as well as allowedtownships for city, town, rural, wilderness. is a great start however you will also need to add the <prefab_rule name="traderGroup"> to the town groups, but in the same format as the skyscrapers, so like this <prefab rule="traderGroup"> notice the space between prefab and rule. also it will have to fit in a 4F by 4F space. if you dont know what that means or how big that is, you may need to research axiom, it was a ... fun... weekend. lol, it im not sure if the trader prefab is 4F by 4F. i know ive seen traders in towns before, i think it was in the valmod or no, WotW, even though that was for 16.4 you should download it explorer the rwg and determine what you need to do to replicate it. it may be worth a shot, to backup your current working folder to a seperate place outside of steam, download a clean install of 16.4 and install WotW and check it out in person, as well as the rwg file, and the xml for the prefabs. that should provide enough info to see what you missed. I will have to definetly research what a 4F by 4F space is. Totally don't understand that. But the rest made sense thanks. Will change my zones section in the prefabs files. I think xpath can't target the prefab file, only xml files in the config folder. Hopefully it works this way, or else I am screwed. Trying to stay away from editing the original files if I can. Your path is wrong for the appends, this seems to work <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name='downtownGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> I seen this thread and did catch that. Thanks. Also you have to remember too, A16.4 things that generated are based on the Game Seed and size of places. I am pretty sure that still exists in A17. I have tried different seeds and got different results with traders. BUT the best thing with the new system is we have access to the prefabs.xml on the world folders generated and you can just MANUALLY places prefabs with the coords now and have them imported now. Guppycur has a video on how to add them in (prefabs) I did play the War of the Walker mod and they had special traders in that, i remember. It's what gave me the idea for adding regular traders to the town. I didn't see guppycur's video, so i will watch that. thanks. where is the Prefab xml your trying to change here located? <Prefabs> <set xpath="Prefab/property[@name='AllowedTownships']/@value='city,town,rural,wilderness'">residentialOld,residentialNew,commercial,downtown,industrial,rural,wilderness</set> </Prefabs> It's located in the 7DTDmainfolder/data/prefabs. Hopefully you can edit that with the xpath modding system. Thanks for all the help with this guys. I have changed my code a little and it now loads into the game with no warning or errors. I set the wilderness traders to a min of 10 and max of 14 and that portion of the codes seems to work (except most of the traders are around 1 or 2 towns, so that kinds suck). But the traders will not load into towns. I think it's because i changed the allowedtownship and not zones. I will change that in the prefabs and let you guys know. Thanks again. Link to comment Share on other sites More sharing options...
rickyralph Posted December 19, 2018 Author Share Posted December 19, 2018 Thanks for all the comments, super helpful and sorry for the late replies, really new to the forum and thought i would get a message when people replied to my threads but i never did (or i missed them, very likely). changing the prefab xml to include the city groups in the zones, as well as allowedtownships for city, town, rural, wilderness. is a great start however you will also need to add the <prefab_rule name="traderGroup"> to the town groups, but in the same format as the skyscrapers, so like this <prefab rule="traderGroup"> notice the space between prefab and rule. also it will have to fit in a 4F by 4F space. if you dont know what that means or how big that is, you may need to research axiom, it was a ... fun... weekend. lol, it im not sure if the trader prefab is 4F by 4F. i know ive seen traders in towns before, i think it was in the valmod or no, WotW, even though that was for 16.4 you should download it explorer the rwg and determine what you need to do to replicate it. it may be worth a shot, to backup your current working folder to a seperate place outside of steam, download a clean install of 16.4 and install WotW and check it out in person, as well as the rwg file, and the xml for the prefabs. that should provide enough info to see what you missed. I will have to definetly research what a 4F by 4F space is. Totally don't understand that. But the rest made sense thanks. Will change my zones section in the prefabs files. I think xpath can't target the prefab file, only xml files in the config folder. Hopefully it works this way, or else I am screwed. Trying to stay away from editing the original files if I can. Your path is wrong for the appends, this seems to work <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name='downtownGroup']"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> I seen this thread and did catch that. Thanks. Also you have to remember too, A16.4 things that generated are based on the Game Seed and size of places. I am pretty sure that still exists in A17. I have tried different seeds and got different results with traders. BUT the best thing with the new system is we have access to the prefabs.xml on the world folders generated and you can just MANUALLY places prefabs with the coords now and have them imported now. Guppycur has a video on how to add them in (prefabs) I did play the War of the Walker mod and they had special traders in that, i remember. It's what gave me the idea for adding regular traders to the town. I didn't see guppycur's video, so i will watch that. thanks. where is the Prefab xml your trying to change here located? <Prefabs> <set xpath="Prefab/property[@name='AllowedTownships']/@value='city,town,rural,wilderness'">residentialOld,residentialNew,commercial,downtown,industrial,rural,wilderness</set> </Prefabs> It's located in the 7DTDmainfolder/data/prefabs. Hopefully you can edit that with the xpath modding system. Thanks for all the help with this guys. I have changed my code a little and it now loads into the game with no warning or errors. I set the wilderness traders to a min of 10 and max of 14 and that portion of the codes seems to work (except most of the traders are around 1 or 2 towns, so that kinds suck). But the traders will not load into towns. I think it's because i changed the allowedtownship and not zones. I will change that in the prefabs and let you guys know. Thanks again. Link to comment Share on other sites More sharing options...
rickyralph Posted December 19, 2018 Author Share Posted December 19, 2018 So I fixed the parts that were mentioned and other errors that i found, but can't get the traders to show in towns. I haven't fully looked into the axiom coding (That's another demon altogether). I do get an increase in traders through out the wilderness, so i know that, that part of the codes works. Still don't know if xpath works with the prefabs. I have the War of the Walker downloaded and will also go over that. Anyways here is my code. Can someone look at it and give me some insight on this. <configs> <!-- Adding Traders to the prefab_rule of each group --> <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name=residentialOldGroup]"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name=residentialNewGroup]"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name=commercialGroup]"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name=downtownGroup]"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name=industrialGroup]"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name=ruralGroup]"> <prefab rule="traderGroup" min_count="1" max_count="1" prob="100"/> </append> <!--Changing the min and max for the trader on the Wilderness Group--> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=wildernessGroup]"> <prefab rule="traderGroup" min_count="10" max_count="12"/> </set> <!--Changing the min and max on allowed trader 1--> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_01]/@min_count">2</set> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_01]/@max_count">4</set> <!--Changing the min and max on allowed trader 2--> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_02]/@min_count">2</set> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_02]/@max_count">4</set> <!--Changing the min and max on allowed trader 3--> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_03]/@min_count">2</set> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_03]/@max_count">4</set> <!--Changing the min and max on allowed trader 4--> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_04]/@min_count">2</set> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_04]/@max_count">4</set> <!--Changing the min and max on allowed trader 5--> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_05]/@min_count">2</set> <set xpath="/rwgmixer/prefab_rules/prefab_rule[@name=traderGroup]/prefab[@name=settlement_trader_05]/@max_count">2</set> </configs> Prefabs settlement trader 1-5 (all the same, just name change for file). <Prefabs> <append xpath="/prefab/property[@name=Zoning]/@value='any'">residentialOld,residentialNew,commercial,downtown,industrial</append> <set xpath="/prefab/property[@name=AllowedTownships]/@value='city,town,rural,wilderness'">residentialOld,residentialNew,commercial,downtown,industrial,city,town,rural,wilderness</set> </Prefabs> Thanks for the help. Link to comment Share on other sites More sharing options...
FastBurst Posted December 19, 2018 Share Posted December 19, 2018 So I fixed the parts that were mentioned and other errors that i found, but can't get the traders to show in towns. I haven't fully looked into the axiom coding (That's another demon altogether). I do get an increase in traders through out the wilderness, so i know that, that part of the codes works. Still don't know if xpath works with the prefabs. I have the War of the Walker downloaded and will also go over that. Anyways here is my code. Can someone look at it and give me some insight on this. Prefabs settlement trader 1-5 (all the same, just name change for file). Thanks for the help. Also there was a known bug to with the RWG that I don't believe has been fixed completely as of yet and that is Zoning. Which is why things like Downtown Skyscrapers were not being seen anywhere on everyone's maps This also could be why it's not work for you at the moment. Custom trader prefabs are pretty easy to make as well which I have done and seen a lot of others do as well, you just have to flag it as a trader in the xml of the prefab and make sure you spawn in a static trader. Link to comment Share on other sites More sharing options...
rickyralph Posted December 19, 2018 Author Share Posted December 19, 2018 Also there was a known bug to with the RWG that I don't believe has been fixed completely as of yet and that is Zoning. Which is why things like Downtown Skyscrapers were not being seen anywhere on everyone's maps This also could be why it's not work for you at the moment. Custom trader prefabs are pretty easy to make as well which I have done and seen a lot of others do as well, you just have to flag it as a trader in the xml of the prefab and make sure you spawn in a static trader. I was thinking about doing that also, making something similar, but smaller, as the war of the Walker trader. Making the prefab should be easy and they code for the prefab xml shouldn't be hard either. But when you say spawn trader, how does that work? Is that in game when I am playing the world or can I do that when I make the prefab, so they always spawn with the prefab? Will I have to set a trader spawn location, like a stand here marker? Thanks for the help. Link to comment Share on other sites More sharing options...
FastBurst Posted December 19, 2018 Share Posted December 19, 2018 Enter Debug Mod, F1 on the console type dm and then once you are done exit the console press F6 and spawn in the Trader you want inside I can't remember if they have to be Static or Dynamic when doing it. Link to comment Share on other sites More sharing options...
three08 Posted December 19, 2018 Share Posted December 19, 2018 If your making a prefab that will be spawned into the game I think you have to put the "spawnTrader" block where you want the trader to be. Link to comment Share on other sites More sharing options...
FastBurst Posted December 19, 2018 Share Posted December 19, 2018 If your making a prefab that will be spawned into the game I think you have to put the "spawnTrader" block where you want the trader to be. Correct I believe you use that method if you want it to give you the Find Trader Quest. Not 100% on that one anymore with all the changes LOL Link to comment Share on other sites More sharing options...
rickyralph Posted December 19, 2018 Author Share Posted December 19, 2018 Thanks for the help. I started on a prefab, just need to finish it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.