Jump to content

'Creation' Of New Item Using Existing Item


Qwynn

Recommended Posts

So I have an idea which I (think) is possible, but I'm not really sure how to go about it (or if it even is). Hopefully a more advanced modder here on the forums could confirm or deny the possibility and if I am going about it the right way, should it be feasible.

 

With certain models_# XMLs now being pushed by the server, I'm thinking it would be possible to use models_5 to create a new item which would then be used in a tweaked recipes XML.

 

Specifically, I want to duplicate and then modify the '44MagnumParts' item to create a 'GunParts' (using all the same assets aside from the name). This new item would then be used in all firearms recipes (aside from the magnum, which already has its own parts).

 

Another option would be to change the original '44MagnumParts' item to the new 'GunParts' item which would then be used by everything.

 

Along the same train of thought, it is possible to create custom recipe books to unlock recipes, or no?

 

(And if worse comes to worse and the above is not possible, I suppose I could just make all firearm recipes require '44MagnumParts', increase the loot chance to compensate, and decrease the loot chance of all other magnum pieces to compensate for that and keep magnums rare).

 

Erm, yeah.

Link to comment
Share on other sites

Ah, that's unfortunate. I know that it was mentioned that the creation of new blocks was technically possible even if limited to current assets, so I was hoping the same would be true for items.

Link to comment
Share on other sites

There's no reason it wont work for items. I've made seeds while working on some new plants. The only hard stuff to get at right now is the textures and models. The biggest thing is you need to have unique IDs, and all the links must reflect the proper ID. You'd also have to add the items to the loot list, or use creative mode to get the new items.

Link to comment
Share on other sites

There's no reason it wont work for items. I've made seeds while working on some new plants. The only hard stuff to get at right now is the textures and models. The biggest thing is you need to have unique IDs, and all the links must reflect the proper ID. You'd also have to add the items to the loot list, or use creative mode to get the new items.

 

Well, since in my circumstance models and textures will be pulling from the preexisting ones, it should be theoretically possible then. Guess I'll give it a try and see what happens!

 

What about recipes book, if you have an experience with that?

Link to comment
Share on other sites

For recipe books should equally be possible for same reasons. You can modify an existing book to unlock (learn) whatever you want, however many you want. They just use the LearnRecipe action.

 

Example of an existing that does multiple:

recipes_to_learn="9mmBullet,10mmBullet,762mmBullet,bulletTipMold,bulletCasingMold"

 

As long as the item name referenced is valid it should work the same way.

Link to comment
Share on other sites

Grim, would it be better if we got unity pro for modding? Or do you think that that part of the engine would be blocked from modders and we would be relegated to just scripts and hooking them into files custom coded?

 

I am thinking about taking classes for unity. I already have java under my belt but was thinking that this is more towards C# I should start looking into C# or C++ and unity itself.

Link to comment
Share on other sites

I don't use Unity at all. I downloaded it, but I really haven't messed with it, so I can't really comment.

 

That said, I don't think it would be a good investment for modding. It may facilitate some things, but much of that I think can be done with the free version. Unity won't extract or import assets files. It will create new ones, but trying to make Unity create an assets file for 7 Days 2 Die would be impossible. Unless you work for TFP, and have access to the entire build. Most of the C# scripting is done with 3rd party tools like Visual C# which you can get the Express edition from Microsoft for free. I personally do all my core mods in CIL (Common Intermediate Language) which is similar to assembly style coding. Most Windows machines already have the utilities need to do it, and it produces identical files to the original except the parts that are edited.

 

It's really all about what you want to do. I wouldn't recommend buying anything to mod Unity Games at the moment. Most of us are using free tools.

Link to comment
Share on other sites

There's no reason it wont work for items. I've made seeds while working on some new plants. The only hard stuff to get at right now is the textures and models. The biggest thing is you need to have unique IDs, and all the links must reflect the proper ID. You'd also have to add the items to the loot list, or use creative mode to get the new items.

 

You can add item to the recipes but it works bad. If you add custom item from model 5 to the recipes and item will be not in in model 5 on the client u will get errors in console after login on the server and see no recipes in Inventory, but if u relogin second time u see all recipes including custom u've added and it works fine. I spent a lot of time tring to fix this somehow but no clue yet.

Do know how to fix it but hope it will be fixed when PIMPS move more config pushed from server side

Link to comment
Share on other sites

I was successfully able to create a new item as defined in the original post (GunParts) and use it in a crafting recipe. It is correctly pulling from the 44 Magnum mesh, but I'm not sure where I could look to add an inventory icon for it as well as fix the item name (it's displayed as GunParts and would like to add a space as seen with other items).

 

Recipe book testing will be next, but if anyone has an idea as to the icon and name, that'd be great. :3

Link to comment
Share on other sites

Unless there's another way as currently implemented I think you'd have to update the item image index including header information, and potential item asset table, and the atlas 3d preview DDS. TFP may be in process of offloading these to bundles I don't know yet but Grim and a couple others that have analyzed the bundles may have clues where it's headed.

 

I've created processors so it would be possible to enhance them and add features to my editor to "update / insert" them into the index and dds, including automatic details. I've not given it serious consideration yet because several core game elements are in flux.

 

Should have a far better idea (and a more concrete foundation) once TFP release a few more patches, especially generated worlds and whatever changes show up to make that possible.

Link to comment
Share on other sites

I was successfully able to create a new item as defined in the original post (GunParts) and use it in a crafting recipe. It is correctly pulling from the 44 Magnum mesh, but I'm not sure where I could look to add an inventory icon for it as well as fix the item name (it's displayed as GunParts and would like to add a space as seen with other items).

 

Recipe book testing will be next, but if anyone has an idea as to the icon and name, that'd be great. :3

 

Grim can you run us through how to do something similar like just making a duplicate item? ironHelmet, and then ironHelmetAgain exact copy of the item but with different ID and name? Like why doesn't this just work?

 

<item id="381" name="ironHelmet" material="organic" stacknumber="1" mesh_file="Items/Clothing/Head/swatHelmetPrefab" hold_type="21">

<property name="EquipSlot" value="Head"/>

<property name="FuelValue" value="16" />

<degradation usetimes="250" breaks="true" />

<armor melee="0.6" bullet="0.4" puncture="0.4" blunt="0.5" explosive="0.5"/>

<preview zoom="28" pos="0,-0.05" rot="90,45,0" />

<property name="Group" value="Clothing" />

</item>

 

<item id="9999" name="ironHelmetAgain" material="organic" stacknumber="1" mesh_file="Items/Clothing/Head/swatHelmetPrefab" hold_type="21">

<property name="EquipSlot" value="Head"/>

<property name="FuelValue" value="16" />

<degradation usetimes="250" breaks="true" />

<armor melee="0.6" bullet="0.4" puncture="0.4" blunt="0.5" explosive="0.5"/>

<preview zoom="28" pos="0,-0.05" rot="90,45,0" />

<property name="Group" value="Clothing" />

</item>

Link to comment
Share on other sites

Ah, alright. Makes sense.

 

More work than I was anticipating, but should be doable. Are those server pushed or no, as most of this work is going towards my server rather than singleplayer.

 

On the other hand, I wonder if it would just be a better idea to wait a little on the addition of custom items and recipe books (which I did get the latter working) until a few more patches have gone by for ease of modding (and having them server pushed).

 

Hmm hum.

 

Grim can you run us through how to do something similar like just making a duplicate item? ironHelmet, and then ironHelmetAgain exact copy of the item but with different ID and name? Like why doesn't this just work?

 

<item id="381" name="ironHelmet" material="organic" stacknumber="1"  mesh_file="Items/Clothing/Head/swatHelmetPrefab" hold_type="21">
       <property name="EquipSlot" value="Head"/>
       <property name="FuelValue" value="16" />
       <degradation usetimes="250" breaks="true" />
       <armor melee="0.6" bullet="0.4" puncture="0.4" blunt="0.5" explosive="0.5"/>        
       <preview zoom="28" pos="0,-0.05" rot="90,45,0" />
       <property name="Group" value="Clothing" />
   </item>

<item id="9999" name="ironHelmetAgain" material="organic"  stacknumber="1" mesh_file="Items/Clothing/Head/swatHelmetPrefab"  hold_type="21">
       <property name="EquipSlot" value="Head"/>
       <property name="FuelValue" value="16" />
       <degradation usetimes="250" breaks="true" />
       <armor melee="0.6" bullet="0.4" puncture="0.4" blunt="0.5" explosive="0.5"/>        
       <preview zoom="28" pos="0,-0.05" rot="90,45,0" />
       <property name="Group" value="Clothing" />
   </item>

 

I found that if you set the item ID number to high it won't load. I started off trying at 999 but then moved right down to 630-640 and the items, new or duplicate, are loading in just fine.

Link to comment
Share on other sites

Hmm you're right. However it seems like you must increment the item ID from that point on if you want more items. I just duplicated 40 iron glove schematics with different names. Now I wonder where the lines to assign items their icons.

 

The item localization is inside the English.txt or whatever language file.txt you're under on. This is client sided as far as I know so you can't push it :(

Link to comment
Share on other sites

Ah, alright. Makes sense.

 

More work than I was anticipating, but should be doable. Are those server pushed or no, as most of this work is going towards my server rather than singleplayer.

 

Not all are sent yet but that's what several of us have been "pushing" for, for a very long time now.

 

8.7 was the beginning of TFP doing it. A major reason was (probably) due to its impact in reducing some of the cheat / grief ♥♥♥♥. The more they add to the push (hoping a few more next release) the more impact there is.

 

An automatic "bonus" of that is the more assets pushed from server to client, the more customization can be done isolated at the server. Clients simply connect to experience that servers environment.

 

 

On the other hand, I wonder if it would just be a better idea to wait a little on the addition of custom items and recipe books (which I did get the latter working) until a few more patches have gone by for ease of modding (and having them server pushed) ...

 

That's been an issue yes. Tool (and other) makers putting in even more massive amounts of work and then core game plumbing dramatically overhauled, but the latter is expected. Fundamental core changes by TFP until feature x, y, z (and the supporting structures) hammered out the way they want it.

 

For an alpha-stage game with extensive work and features still on the horizon I'd say 7D2D is gaining an impressive community of creative people.

 

Soon as they can help admins get control of the servers and crush those ♥♥♥♥ing bastards that ruin so many games it should ramp nicely. Lot of people without the technical knowledge (or the desire) to make the stuff, but they'd sure like to enjoy the results. Just need a handle on the ones whose goal is to destroy it.

Link to comment
Share on other sites

Amen, Blood. I'm dying to be able to make custom blocks/items for the community, but I want a handle on the cheats/cheaters first. With more handled server-side and with more files pushed server-side, we'll be one more step towards twarting the bastards... heh.

 

I'm just excited with the possibility of getting into the new bundled files to make our own blocks before TFP implements Steam Workshop. If I have to make five more prefab homes with the same damn three or so drywalls I'm going to scream... lol.

Link to comment
Share on other sites

Okay so, here's what I found out after making custom items and blocks. Despite it being server sided... It's really not.

 

Models_2 and 5 will be pulled from the server when it shows up as needed. Should the player handle these custom items themselves, the client will not accept it afterword because it reads the client's file instead of the server's. Meaning you need matching files.

 

The recipe.xml will show up empty for the players if the custom items are not added into their recipe file in parallel with the server.

Link to comment
Share on other sites

Okay so, here's what I found out after making custom items and blocks. Despite it being server sided... It's really not.

 

Models_2 and 5 will be pulled from the server when it shows up as needed. Should the player handle these custom items themselves, the client will not accept it afterword because it reads the client's file instead of the server's. Meaning you need matching files.

 

The recipe.xml will show up empty for the players if the custom items are not added into their recipe file in parallel with the server.

 

Is this using the new dedicated server?

Link to comment
Share on other sites

Okay so, here's what I found out after making custom items and blocks. Despite it being server sided... It's really not.

 

Models_2 and 5 will be pulled from the server when it shows up as needed. Should the player handle these custom items themselves, the client will not accept it afterword because it reads the client's file instead of the server's. Meaning you need matching files.

 

The recipe.xml will show up empty for the players if the custom items are not added into their recipe file in parallel with the server.

 

Maybe they are pushed server-side to the clients, but some sort of tech isn't completed yet if this isn't using the new dedicated server tech? I hope it isn't half-implemented without justifiable cause or this is just another wall we'll have to work around... heh.

Link to comment
Share on other sites

Is this using the new dedicated server?

and new dedicated as well

 

- - - Updated - - -

 

Okay so, here's what I found out after making custom items and blocks. Despite it being server sided... It's really not.

 

Models_2 and 5 will be pulled from the server when it shows up as needed. Should the player handle these custom items themselves, the client will not accept it afterword because it reads the client's file instead of the server's. Meaning you need matching files.

 

The recipe.xml will show up empty for the players if the custom items are not added into their recipe file in parallel with the server.

 

tnx for sharing this info. I hope developers finish transfer to server side in nearest builds.

Link to comment
Share on other sites

Yeah, really great to know, Kaillera.

 

That means that while it is possible for us to work on our new items and all that other fancy stuff, there's no real point at the moment as it is not completely pushed from the server.

 

I mean, if you run a private server it would technically be feasible to provide the files for download, that just seems like a hassle for the users.

 

Meh.

 

I guess I'll just sit on my stuff for a while then. Ah, well.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...