Jump to content

ModInfo.xml Improvements


zztong

Recommended Posts

Consider the following:

 

<?xml version="1.0" encoding="UTF-8" ?>
<xml>
        <ModInfo>
                <Name value="ZZTong-Prefabs" />
                <Description value="Adds prefabs made by ZZTong." />
                <Author value="ZZTong" />
                <Version value="20.6.013" />
        </ModInfo>
</xml>

 

(1) I suspect I'm using "Version" incorrectly. I suspect the desired value is to be the game version. I'd like to be able to express a modlet version too as this can be handy for debugging. Consider this log file entry:

 

2022-12-17T16:04:59 8.907 INF [MODS] Trying to load from folder: 'ZZTong-Prefabs'
2022-12-17T16:04:59 8.908 INF [MODS] Loaded Mod: ZZTong-Prefabs (20.6.013)

 

(2) It would be handy to be able to enable/disable a modlet, rather than move modlet files around. I suspect this would ultimately best be done via a future game feature that allowed for modlet management. In the mean time, perhaps allowing folks to enable/disable a modlet's loading when entering a new game or continuing a game (when modlet XML is actually applied).

 

(3) It would also be handy to be able to express modlet dependencies in the XML. That is, allow a modlet to indicate zero or more other modlets that must be present. Then, have the game check to see if those dependencies are met and either put a message in the logfile and/or via some kind of dialog.

 

So, final proposal, consider this example ModInfo.xml file:

 

<?xml version="1.0" encoding="UTF-8" ?>
<xml>
    <ModInfo>
        <Name value="ZZTong-Prefabs" />
        <Description value="Adds prefabs made by ZZTong." />
        <Author value="ZZTong" />
        <Game-Version value="20.6" />
        <Modlet-Version value="013" />
        <Dependencies>
            <Modlet name="Cranberry-Monster-Arcade" />
      	</Dependencies>
       	<Load-Modlet value="Enabled" />
    </ModInfo>
</xml>

 

Which might result in:

 

2022-12-17T16:04:59 8.904 INF [MODS] Trying to load from folder: 'Cranberry-Monster-Arcade'
2022-12-17T16:04:59 8.905 INF [MODS] Loaded Mod: Cranberry-Monster-Arcade version 02 for Game version 20.6
2022-12-17T16:04:59 8.906 WRN [MODS] Modlet Cranberry-Monster-Arcade disabled in ModInfo.xml
2022-12-17T16:04:59 8.907 INF [MODS] Trying to load from folder: 'ZZTong-Prefabs'
2022-12-17T16:04:59 8.908 INF [MODS] Loaded Mod: ZZTong-Prefabs version 013 for Game version 20.6
2022-12-17T16:04:59 8.909 WRN [MODS] Modlet Dependency Not Found: Cranberry-Monster-Arcade

 

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

  • 3 weeks later...

I think these are great improvements.  One again to add to that... Having looked at your prefabs modlet, I saw the dependency for the cranberry arcade mod is for one prefab.  If they were to add this kind of improvement, it would help for it to also handle something like your prefab modlet where it would check dependency for specific prefabs and potentially disable any without the required dependencies rather than just a warning when the dependency only affects one prefab out of dozens.  That would probably be best in the rwgmixer.xml file, of course.

 

Might also be good to be able to specify the version of the dependency as a mod might be updated with a new feature that is required and older (or newer) versions won't work for your needs.  It could be either "this version or higher" or a version range.  An example would be how the cranberry arcade mod may eventually include pinball machines. If you add a pinball machine to your prefab that needs that version of the mod, an older version without them won't work even though it is the right mod.

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

3 hours ago, Riamus said:

Having looked at your prefabs modlet, I saw the dependency for the cranberry arcade mod is for one prefab.  If they were to add this kind of improvement, it would help for it to also handle something like your prefab modlet where it would check dependency for specific prefabs

 

That's @Deverezieaux's modlet.

 

I can't imaging asking the game to crawl through each POI looking for a dependency, but if it did and figured out dependencies on its own that would be sweet.

 

My suspicion is that Dev (and I) would scatter more of Cran's arcade stuff thorugh our POIs if dependencies were easier. I suspect his using it one POI is just putting a toe in the water. I've done similar. I have an unreleased prefab modlet with some of Cran's (and other's) objects in it. I'm not yet ready for the extra support requests from unknowledgable users.

Link to comment
Share on other sites

Chiming in, yes @Cranberry Monster and I were just experimenting at this point to see if including custom props/blocks was going to be a problem. Cran has a whole plan for implementing versions of his props that would give options for "simple versions" (my words) for people who didn't want to have the complex animations and sounds. Cran can explain his stuff way better than I can so I won't get into it too much.

 

On my end I implemented them the way I did, only including them in the arcade POI rather than spreading them around, so that if someone doesn't have the arcade props the Arcade POI just won't spawn. That way the rest of my POI modlet can still work. From testing, as far as I can tell that's what happens. Without the proper custom blocks a POI just won't spawn. It's actually kind of a shame as I'd love to use Cran's stuff more because it's awesome, I just don't want to prevent more of my POIs from spawning if someone doesn't have his stuff installed.

 

Pardon the sloppy explanation, I was actually working on two different  POIs when I saw this and wanted to respond with something!

Link to comment
Share on other sites

15 hours ago, zztong said:

 

That's @Deverezieaux's modlet.

 

Oops. You mentioned Craberry's mod, so I thought it was your prefab.  Sorry for any confusion for people.

 

It should not be too time consuming for the game to check dependencies, even if you were to have a thousand prefabs.  You just note which mods are loaded and then go through the dependency for each prefab with a simple check that the dependencies listed are among the loaded mods.  Even at a thousand prefabs, that check shouldn't take more than a couple of seconds.  But that assumes they do a check in the way I am thinking. They might implement it in another way (if they did implement it) and that way might be more time consuming, so might not be worth it.

 

I did get both your and Deverezieaux's modlets, though haven't started a new game yet to try them out.  I don't plan to use Cranberry's mod simply because I am not interested in having a bunch of additional loot that only helps with decorations, though having the arcade decorations available would be nice.  It's the same reason I don't use the mod for finding and repairing vehicles.  I'd love all the vehicles to be in the world, but I don't want to have all those extra parts taking up space.  That's just me, though.  😀

Link to comment
Share on other sites

12 minutes ago, Riamus said:

I did get both your and Deverezieaux's modlets, though haven't started a new game yet to try them out.  I don't plan to use Cranberry's mod simply because I am not interested in having a bunch of additional loot that only helps with decorations, though having the arcade decorations available would be nice.

 

That's sort of an area of discussion.

 

For instance, I'd like to include the various broken arcade objects and have them hand out vanilla items, like mechanical and electrical parts.

 

For those who'd like to also have Cran's "mini-game" of being able to assemble "working" arcade games, I think that's a nice addition.

 

I've suggested in the past that this seems to lend itself to Cran's stuff being two modlets. One that adds vanilla-supporting objects that I can use to seed the game with broken arcade objects. Then a second modlet that inserts the various additional mini-game items into the loot lists of the otherwise vanilla-supporting objects.

 

So, install the base modlet and you get broken video games handing out vanilla items. My dependency would be on the base modlet. Then, if somebody installs the second modlet and they get the ability to craft Cran's really cool stuff for their bases. If we don't seed the game with basic video game objects, there's no basis for the entire mini-game. At the same time, I don't want to make my POIs useless to people who want a vanilla-like experience. I think the two modlet approach hits both goals. Hence - dependencies and this suggestions.

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

I really like that idea. 😁

 

I do like being able to craft/repair new things like the arcade machines and vehicles, but there are already so many things I lot that I never use.  It's hard to think about having more things that I only make a couple times in a game and then never make in that game again, yet continue to loot the parts.

 

Btw, great modlets from both of you.  Even though I haven't actually used them yet, the prefabs are great and I can't wait to start a new game with them. I've only made one prefab so far, based on a real house.  It came out decent enough, but I still need a lot of practice (and patience) to come close to what you two are making.

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

Hi, folks, just wanted to update you on future plans for the video game mod/mods, and to say I really appreciate all the feedback based on different players play styles. I'm currently making some fixes and improvements to the arcade models for A21, where I imagine I'll go with the tiered mod approach discussed earlier--a small, simple modlet that adds broken video games, change machine, and pinball games, and then a larger modlet that adds special salvage parts and craftable machines with sound and animated screens. I could even add a third modlet that would allow you to turn off things you don't like without digging into the original xml--such as turning off the arcade part drop from loot and salvage. Just an aside on the unused arcade salvage you get--the PCBs have their material defined as Electrical Parts and a weight of 22, meaning if you scrap a PCB you don't want or need, you get a (probably overly generous) 22 Electrical Parts.

 

I'll try to keep concerned parties in the loop about progress on this, though side projects are keeping me kind of busy presently. Thanks again for your interest, though.

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...