Cool! One more question: can you have multiple config files? Like, say I specifically wanted to make a mod that used this mod for part of its functionality, but didn't want to overwrite other people's personal config files. Is that an option?
I don't understand the need for a separate settings file for 'certain' items. You can call out those 'certain' items in the regular settings file. You can put it in multiple lists and activate whichever list you want to be active.
No, I mean if I were to create a mod that uses this mod as a dependency, then I'd create a list of items for that mod, but I'd want it to be in its own separate config file, so that it doesn't overwrite the default config file, in which people would most likely have their own personal settings.
I'm not getting how you would use this like that so I can't figure out how to implement that.
Can you tell me how you would like this to work? Like exactly what you would put in your custom file and how it should be loaded into the item replacer script. Maybe I can figure it out if I can see how you want to use it. Be as general or specific as needed.
I think what the user means is if we have 2 mods installed along with this mod and the skyrim platform(obviously)
Say 'Mod A' a wants to change all the vanilla empty bottles for a new mod added version that has a script on it thats used in some function in the mod. Basically it converts vanilla none function bottles for ones setup to work with a system, because this is dynamic we dont have to change all the existing placed bottles or edit level lists and so this works with any mod that uses and places the vanilla bottles.
'Mod B' is set to swap say bread with one thats has a script on it so when you pick up vanilla bread it swaps to a modded one with a script for some function aswell. Same situation, just a procedural way to upgrade vanilla items with versions with new functionality without editing the vanilla record for the original item.
If these are two separate mods are loaded at the same time how would there configs be 'merged' because there is only one config file currently they would override each other, one replacing the config over the other. A user would need to manually add the config edits from one file to the other to merge them so both mods swap functions are applied together.
So if instead your system read any config file instead of the specific named one then each mod can have a config with the setup for that mod to swap what it needs to, your system just goes through all available config files and loads in all the edits ect no manual merge needed Pretty much how Spell Perk Item Distributor works, mods add there own inis and spid just reads them all and loads the data Much like SPID you set a rule that all files need to end with _AUTOREPLACE.txt, so like MyModName_AUTOREPLACE.txt Then have your system search for files ending with _AUTOREPLACE.txt and it reads the data and works
The we can easily use this as a framework to dynamically swap items and not worry about mod compatibility.
I did have my own question, could this system also swap in the world and other containers not just on pick up. So perhaps when we are setting up items to be swapped we can add a definition to swap on pick up or on cell load, so it swaps an item in the world or in a container/inventory(excluding the player) or only when we the player picks up the items
It would offer similar function that Base Object Swapper offers but BOS dosnt work inside containers and is generally geared for static meshes If we can setup a swap system that doe this inside containers then we can create alternatives to leveled lists, that would be way more compatible the actual level lists.
Especially if we can set multiple things to swap with. Lets say i have a mod that adds in many new food items, so i want to setup a swap system where i swap vanilla bread with one of a list of specified items. So in terms of a config example
'text' 'old' 'new1' 'new2' 'new3'
So now the old will be swapped with one of the new items of the 3 to choose from. Could do the same for 'old' so like 'old1' old2' ect So we can setup one config to swap a list of items with a list of items. So for my mod example that adds new food items I would set all the 'old' entry's to be all the vanilla food items and all the 'new' entry's to be all the mod add items Any time a vanilla food item appears the mod food item can appear instead.
Could add a random chance to swap or keep the original, so in my example it will randomly change vanilla food to modded food or sometimes keep the vanilla food.
Perhaps add a 'options' section where we can add these things for example 'options': 'OnLoad', 'Random-50', 'Brake-30'
'OnLoad' sets if it swaps as you load into the world without this added it just dose on pickup instead 'Random- set it to randomly not make a swap with the number being the percentage to swap, so 50/50 chance in my example 'Brake- being the brake chance you have already
Sorry for the long comment but i hope it was all clear, i dont know about the swapping inworld part of my suggestion i understand your just probably removing items and adding items to the player inventory silently but if it could also remove and place items in other containers then that would be a big bonus and the in world placed objects would be the end goal. Base object swapper can do this part but there is no randomization like my suggestion, the author dosnt reply muck to comments and i have seen the feature suggestion alot and its never been addressed to it seems unlikely it will be added to BOS so i thought i would suggest it here as you seem more active on the replying front. If you can or want to do it is obviously down to you :)
There's a lot to take in, but it paints a clearer picture.
Right off, I don't think the item swapping of world items would be easy. I'd have to take into account the item's position, size, rotation and place a new item in the exact spot. I'm not sure SP can actually do that.
The config settings idea sounds plausible. I'll give it some thought and see what I can come up with.
Cool if you need me to explain any more let me know
Random Things is a mod that places random things into the world based on existing things in the world, as in it gets positions of existing objects. Maybe it can help you find a way to do it, just need to disable the original object after so it completes the swap.
Or maybe you could call Base object swapper through your system, as that dose all that position and swapping in the world on an engine level so its more efficient. What object swapper dosnt have is the ability to swap between a list of objects its only a 1 to 1 swap Dynamic Things shows an example of calling object swapper only when you activate something like the mammoth skill for the tusks, it swaps to a mesh without the tusks when you 'take' the tusks So maybe we could setup one of your configs to call one of object swappers configs, your config randomly picks one of object swappers configs from a list and triggers it. That would then be a way to swap one object with a variety of objects dynamically.
Ideally this would just be a feature of object swapper but the author dosnt seem to want to do it. Not sure iv seen it asked a few times and the author has never responded to that idea so i feel like its unlikely to be added so im looking for an alternative or some way to get object swapper to do this. So i thought i would suggest it to you, maybe you can thing of a way to do it easily or maybe its not feasible.
Anyway thanks for looking into the other suggestions, will make this tool just as versatile as SPID XD
Base Object Swapper just updated to be able to swap between any number of random objects with a percentage chance So now instead of being limited to a 1 to 1 swap it can now swap 1 object with say 5 options or more depending on the ini
So BOS can now handle the in world objects like my suggestion, so your mod would be good to handle the in container only objects as its intention Just thought id add this comment about the update
It would be great if there was a chance to remove/destroy items that you pick up. So basically items that you find would "break", which would be an interesting way to reduce loot in the game.
Like add a random chance these items would disappear? You can turn them into a single coin to get rid of them. It could have a random activation chance... that could be an option.
This is actually very useful for something I was doing in my personal game.
Would it be possible to do it the other way around as well? Item that you're dropping / putting into container / giving to NPC would turn back into something else?
Alright... v1.0.1 has "give-lists" - an example is provided in the zip file. Turns ingots into ore. Does not work when dropping items - they have to go from your inventory to another NPC or a container of some sort.
Try it out. Let me know if that's what you're asking for.
wonderfull! There is something in particular to do for make Platform work with AE? With the last version (2.6) some other mod doesn't work for me. Have you developed this mod with Platform 2.6 directly?
26 comments
In short, yes.
Can you tell me how you would like this to work? Like exactly what you would put in your custom file and how it should be loaded into the item replacer script. Maybe I can figure it out if I can see how you want to use it. Be as general or specific as needed.
Say 'Mod A' a wants to change all the vanilla empty bottles for a new mod added version that has a script on it thats used in some function in the mod. Basically it converts vanilla none function bottles for ones setup to work with a system, because this is dynamic we dont have to change all the existing placed bottles or edit level lists and so this works with any mod that uses and places the vanilla bottles.
'Mod B' is set to swap say bread with one thats has a script on it so when you pick up vanilla bread it swaps to a modded one with a script for some function aswell. Same situation, just a procedural way to upgrade vanilla items with versions with new functionality without editing the vanilla record for the original item.
If these are two separate mods are loaded at the same time how would there configs be 'merged' because there is only one config file currently they would override each other, one replacing the config over the other. A user would need to manually add the config edits from one file to the other to merge them so both mods swap functions are applied together.
So if instead your system read any config file instead of the specific named one then each mod can have a config with the setup for that mod to swap what it needs to, your system just goes through all available config files and loads in all the edits ect no manual merge needed
Pretty much how Spell Perk Item Distributor works, mods add there own inis and spid just reads them all and loads the data
Much like SPID you set a rule that all files need to end with _AUTOREPLACE.txt, so like MyModName_AUTOREPLACE.txt
Then have your system search for files ending with _AUTOREPLACE.txt and it reads the data and works
The we can easily use this as a framework to dynamically swap items and not worry about mod compatibility.
It would offer similar function that Base Object Swapper offers but BOS dosnt work inside containers and is generally geared for static meshes
If we can setup a swap system that doe this inside containers then we can create alternatives to leveled lists, that would be way more compatible the actual level lists.
Especially if we can set multiple things to swap with.
Lets say i have a mod that adds in many new food items, so i want to setup a swap system where i swap vanilla bread with one of a list of specified items. So in terms of a config example
'text'
'old'
'new1'
'new2'
'new3'
So now the old will be swapped with one of the new items of the 3 to choose from. Could do the same for 'old' so like 'old1' old2' ect
So we can setup one config to swap a list of items with a list of items. So for my mod example that adds new food items
I would set all the 'old' entry's to be all the vanilla food items and all the 'new' entry's to be all the mod add items
Any time a vanilla food item appears the mod food item can appear instead.
Could add a random chance to swap or keep the original, so in my example it will randomly change vanilla food to modded food or sometimes keep the vanilla food.
Perhaps add a 'options' section where we can add these things for example
'options': 'OnLoad', 'Random-50', 'Brake-30'
'OnLoad' sets if it swaps as you load into the world without this added it just dose on pickup instead
'Random- set it to randomly not make a swap with the number being the percentage to swap, so 50/50 chance in my example
'Brake- being the brake chance you have already
Sorry for the long comment but i hope it was all clear, i dont know about the swapping inworld part of my suggestion i understand your just probably removing items and adding items to the player inventory silently but if it could also remove and place items in other containers then that would be a big bonus and the in world placed objects would be the end goal. Base object swapper can do this part but there is no randomization like my suggestion, the author dosnt reply muck to comments and i have seen the feature suggestion alot and its never been addressed to it seems unlikely it will be added to BOS so i thought i would suggest it here as you seem more active on the replying front. If you can or want to do it is obviously down to you :)
There's a lot to take in, but it paints a clearer picture.
Right off, I don't think the item swapping of world items would be easy. I'd have to take into account the item's position, size, rotation and place a new item in the exact spot. I'm not sure SP can actually do that.
The config settings idea sounds plausible. I'll give it some thought and see what I can come up with.
Random Things is a mod that places random things into the world based on existing things in the world, as in it gets positions of existing objects.
Maybe it can help you find a way to do it, just need to disable the original object after so it completes the swap.
Or maybe you could call Base object swapper through your system, as that dose all that position and swapping in the world on an engine level so its more efficient.
What object swapper dosnt have is the ability to swap between a list of objects its only a 1 to 1 swap
Dynamic Things shows an example of calling object swapper only when you activate something like the mammoth skill for the tusks, it swaps to a mesh without the tusks when you 'take' the tusks
So maybe we could setup one of your configs to call one of object swappers configs, your config randomly picks one of object swappers configs from a list and triggers it. That would then be a way to swap one object with a variety of objects dynamically.
Ideally this would just be a feature of object swapper but the author dosnt seem to want to do it. Not sure iv seen it asked a few times and the author has never responded to that idea so i feel like its unlikely to be added so im looking for an alternative or some way to get object swapper to do this. So i thought i would suggest it to you, maybe you can thing of a way to do it easily or maybe its not feasible.
Anyway thanks for looking into the other suggestions, will make this tool just as versatile as SPID XD
So now instead of being limited to a 1 to 1 swap it can now swap 1 object with say 5 options or more depending on the ini
So BOS can now handle the in world objects like my suggestion, so your mod would be good to handle the in container only objects as its intention
Just thought id add this comment about the update
i see there is a random chance of destruction added.
please consider a random chance of swap. using the examples given, pick up iron arrow(s). x% chance it will transmute/change to steel arrow.
So basically items that you find would "break", which would be an interesting way to reduce loot in the game.
You can turn them into a single coin to get rid of them.
It could have a random activation chance... that could be an option.
Would it be possible to do it the other way around as well? Item that you're dropping / putting into container / giving to NPC would turn back into something else?
Do you mean just items that you put in containers/give to NPCs?
And then... change the item back to the original item?
Try it out. Let me know if that's what you're asking for.
There is something in particular to do for make Platform work with AE? With the last version (2.6) some other mod doesn't work for me.
Have you developed this mod with Platform 2.6 directly?