Jump to content

Starter-Pack Mod


Rhonen

Recommended Posts

Version 2.3.0

starter-pack.png.1da75e50e2488192efdba85d69bfb81f.png


The mod creates a default Item-Packages based on available player-classes and stores in JSON file.
As Server-Admin (also in Singleplayer) you can edit this json file by adding the items / blocks with its code.
Editing the Item-Package-Json file requires a restart of the Server/Singleplayer.

unknown.png.68585f439d3043efdcd66a63cd35d231.png

Only the ItemCodes are supported!

All Players will be recorded by its uuid, which is created by VintageStory-AccountManagement, and garantues that no one will get the items twice.

  • path: \VintagestoryData\ModConfig\starterpackmod\<world-id>\starterpack.playersreceivedpackage.json

You can edit both files, but be sure you know what you are doing with it.

HINT for Admins of existing worlds:
For your existing players you must allow users to re-select their playerclass to get the package delivered.
There is a no API to get that information that a player has already closed that dialog.

The mod is regulary thought for multiplayer.
Singleplayer is supported also.

 

Known issues:

  • Backpacks / Baskets etc causing client crashes, so blacklisted them by mod-coding - sorry.

 

Download in ModDB

 

[if you like my mods, with a donation you can support me and my work]

pp.jpg.770b523a29077b73a3b47bd2df492286.jpg

 

 

Edited by Rhonen
Update
  • Like 2
  • Amazing! 1
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Kai Effelsberg said:

You can add starting items already via editing a file in the servers directory. No need for a mod. At least not in mp. Dont know about sp.

Then please share your knowledge with us. the files for the server i know does not support something like this.
This mod was requestet cause we did not find such options.

Until the mod is downloaded and used, i think its not wrong to offer it. i dont understand your comment right now.
 

Edited by Rhonen
misread
  • Like 1
Link to comment
Share on other sites

20 hours ago, Rhonen said:

Then please share your knowledge with us. the files for the server i know does not support something like this.
This mod was requestet cause we did not find such options.

Until the mod is downloaded and used, i think its not wrong to offer it. i dont understand your comment right now.
 

I believe it was the general.json inside the survival folder that you have to edit. I cant have a look right now, since i am at work. But this is how i did it on my server VSo: Conquest of Blocks.

Link to comment
Share on other sites

ok i think i found what you mean.
 

Vintagestory\assets\survival\config\general.json

but there is only this empty entry.
 

startStacks: [
  ],

no information about what and how,  nor in wiki.

I think this mod makes it more comfortable to create a starter-pack. It's an offer to the community, not more, not les.

But ye, experts may not need it. 🙃
And no one is forced to use it. 😅

Edited by Rhonen
  • Like 1
Link to comment
Share on other sites

In fact it has to be done pretty much exactly like in your mod. Only that you use "quantity" instead of "amount".

A question: Does your mod reset after updating the game? Or do the entries stay and the start stacks work no matter what? Because if you do it via general.json, you have to enter the start stack items again after each update of the game.

Link to comment
Share on other sites

Thanks for the info.

Nope, the generated files stay in the

VintagestoryData\ModData\<world-id>\

when updating the game. no need to backup/ recreate them 😉. that would be horrible. 🤪
Tested and confirmed with the todays stable update 1.13.2 😇

Edited by Rhonen
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

@RhonenI am having an issue where this mod won't work after the first world I made with it. I am guessing it has something to do with your statement that "All Players will be recorded by its uuid, which is created by VintageStory-AccountManagement, and garantues that no one will get the items twice. " So the game is thinking it already gave me the items once on the first world and won't give them again?

 

*Edit*

Ok it was actually the mod "Armor Overhaul", the mod was put up in April, so I am guessing it wasn't actually meant for 1.13. I left a message for the mod author in case he plans on updating the mod as it breaks many other mods right now on 1.13. Everything is all good now :) thank you for the mod.

Edited by Raul Beltran
Update status of bug report.
Link to comment
Share on other sites

9 hours ago, Raul Beltran said:

Ok it was actually the mod "Armor Overhaul", the mod was put up in April, so I am guessing it wasn't actually meant for 1.13. I left a message for the mod author in case he plans on updating the mod as it breaks many other mods right now on 1.13. Everything is all good now :) thank you for the mod.

ye, outdated mods can block loading other mods :( sorry for that :)
good to know, that it's now working.


 

Quote

Where do you find the item code info? can't seem to find anything via google, and going into creative doesn't help

the item-codes are not listed anywhere :(
you have to look into the assets folder and look into the json files - or look in the language-files for them.

Link to comment
Share on other sites

you have to edit

  • path: \VintagestoryData\ModData\<world-id>\starterpack.deliveritempackage.json

this is for singleplayer to. so you have to find out the correct world id. may be the last-edit date of the folder or the world-savegame can give you an advise.
i think there is a /command for it, but did not find it in the hury. sorry.

i think that explains that you have to change this for every world.

Link to comment
Share on other sites

For single player, that is not a solution, as that means anytime someone starts a new world they start with your premade pack... isn't there a way for you to reference the deliveritempackage.json file from the mod configs directory as others have done? That way the config in that folder takes precedence instead of your pre packed one.

If that is not something your able to do, then this mod is pointless for singleplayer customization, as anyone can easily just go into creative mode with the gamemode command and give themselves what they want.

Edited by Raul Beltran
Link to comment
Share on other sites

3 hours ago, Raul Beltran said:

If that is not something your able to do, then this mod is pointless for singleplayer customization, as anyone can easily just go into creative mode with the gamemode command and give themselves what they want.

mainly this mod was created to used in multiplayer. the singleplayer is using the same world-mechanic (starting a local server).
i don't know if it is identifyable by code that a singleplayer game was started. i will check that.

but yes, it would be possible to define only one global starterpack.deliveritempackage.json  instead for each world.

Edited by Rhonen
Link to comment
Share on other sites

Released: Version 1.1.2

a little tweak for singleplayer and server:  only one global starterpack.deliveritempackage.json will be created / used.
you can copy the old `starterpack.deliveritempackage.json` from  /vintagestorydata/moddata/<world-id>/ to /vintagestorydata/modconfig/
so you have not to configure each world seperatly.

Link to comment
Share on other sites

2 hours ago, Rhonen said:

Released: Version 1.1.2

a little tweak for singleplayer and server:  only one global starterpack.deliveritempackage.json will be created / used.
you can copy the old `starterpack.deliveritempackage.json` from  /vintagestorydata/moddata/<world-id>/ to /vintagestorydata/modconfig/
so you have not to configure each world seperatly.

Thank you for this change, I know you didn't have to, but it makes a HUGE difference in how usable the mod is :)❤️ , it's working perfect now, and with your help I was able to tweak the starter pack to my liking :D

  • Cookie time 1
Link to comment
Share on other sites

12 hours ago, Raul Beltran said:

Thank you for this change, I know you didn't have to, but it makes a HUGE difference in how usable the mod is :)❤️ , it's working perfect now, and with your help I was able to tweak the starter pack to my liking

np, i will do some more rework for using files by my mods.

Link to comment
Share on other sites

  • 2 weeks later...

@Rhonen get a server error:

23.11.2020 08:55:30 [Error] [starterpack] An exception was thrown when trying to start the mod:
System.MissingMethodException: Method not found: '!!0 SharedLibrary.ApiExtension.LoadOrCreateDataFile(Vintagestory.API.Common.ICoreAPI, System.String)'.
   at starterpack.src.busineslogic.FileManager.LoadReceivedPlayers()
   at starterpack.src.busineslogic.FileManager.init()
   at starterpack.src.StarterPackMod.StartServerSide(ICoreServerAPI api)
   at Vintagestory.Common.ModLoader.TryStartSystem(Mod mod, ModSystem system, ICoreAPI api, ModEventPhase phase)
23.11.2020 08:55:30 [Error] Failed to start system starterpack.src.StarterPackMod

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.