shinnlly Posted December 5, 2018 Share Posted December 5, 2018 I'd like to make a modlet to take arrows apart and receive both the feather and arrow head. I did not see any examples of this in recipes.xml, so I assume it is not possible there. I know you get an empty jar when you drink a jar of water, so I tried adding multiple property name="Create_item" to the items.xml, but you only get the last one defined. Thanks! Link to comment Share on other sites More sharing options...
n2n1 Posted December 5, 2018 Share Posted December 5, 2018 No...never .... they will never be able to realize this simple opportunity... Link to comment Share on other sites More sharing options...
Red Eagle LXIX Posted December 5, 2018 Share Posted December 5, 2018 Workaround: Loot Container: Iron Arrow Box Recipe: Iron Arrow Box - 10 Iron Arrows Loot Container properties for 'Iron Arrow Box' - Destroy on Close - Iron Arrow head QTY 10, Feathers QTY 10. Use Arrows to craft box, place box, retrieve arrowheads and feathers. Probably other ways to creatively work around it as well. Link to comment Share on other sites More sharing options...
SylenThunder Posted December 5, 2018 Share Posted December 5, 2018 No...never .... they will never be able to realize this simple opportunity... I believe the issue is a limitation of the Unity engine. Link to comment Share on other sites More sharing options...
kronons Posted December 5, 2018 Share Posted December 5, 2018 Edit N/A Link to comment Share on other sites More sharing options...
Spider Posted December 6, 2018 Share Posted December 6, 2018 Maybe make the arrows scrapable/craftable to the "ArrowHead" and make a repeating quest that's objective is to craft "Arrowhead". Then make the reward for the quest a feather and to start the same quest again. This way every time your broke down an arrow you would get both the head and feather. Link to comment Share on other sites More sharing options...
Subquake Posted December 6, 2018 Share Posted December 6, 2018 I believe the issue is a limitation of the Unity engine.Please stop. If you have no idea how game engines work, what part is game engines code, what part is game logic coded by the developers of the game, then don't post your 'ideas', because what you just said is absolute nonsense and it's not nice to mislead people with disinformation. You don't have to be game engine specialist to understand, that this isn't an issue of the game engine they are using, because many, many other games made in unity support that feature. Link to comment Share on other sites More sharing options...
SandyBeaches Posted December 6, 2018 Share Posted December 6, 2018 To explain in a more friendly tone, the way recipes are handled internally by 7d2d is to load all ingredients into an ordered dictionary (a kind of list that remembers what order things are in, and each item has a name called the key, and a value) with the item or block as the key, and amount as the value. The output is the first thing added to the dictionary, so when it comes time to use the recipe, the code returns the first item as the output. Codewise, changing this is pretty easy and there are many ways to do it. The simplest change would be to have the first item be 'numoutputs' = x (default 1), the next items being the output/s, then the rest of the ingredients. Internally, the data structure is exactly the same. The only change would be that when reading inputs numoutputs would be checked and that many items +1 skipped from the beginning of the list, and a similar thing would happen with the outputs. The main problems would be: checking for space in inventory and what do you call the recipe? Currently the recipe name is just ripped from the output item, and doesn't even include amount. A simple solution would be to make it 'firstitemname + next item name + etc'. Hell, if someone could point me to a good tutorial on how to make .dll patches for SMX I could do it myself. Link to comment Share on other sites More sharing options...
n2n1 Posted December 6, 2018 Share Posted December 6, 2018 I believe the issue is a limitation of the Unity engine. Yes it is. Link to comment Share on other sites More sharing options...
Royal Deluxe Posted December 6, 2018 Share Posted December 6, 2018 I believe the issue is a limitation of the Unity engine. ...No... Yes it is. Lets arrange. The modules 7D2D uses in unity work in a way that this would need a deeper change. Link to comment Share on other sites More sharing options...
Subquake Posted December 6, 2018 Share Posted December 6, 2018 Stop blaming game engine, it has nothing to do with game logic, that the fun pimps coded in. Bottom line is, that without serious C# rewriting of the recipe code, that the fun pimps wrote (not Unity creators), we can't have multiple outputs. Link to comment Share on other sites More sharing options...
n2n1 Posted December 6, 2018 Share Posted December 6, 2018 Subquake, stop....just Stop This cannot be done without a major rewrite of the Unity code. Link to comment Share on other sites More sharing options...
Subquake Posted December 6, 2018 Share Posted December 6, 2018 Subquake, stop....just Stop This cannot be done without a major rewrite of the Unity code. Where is the basis of your assumption, that it's unity fault? You do realize, that blaming a game engine for game logic code, that wasn't written by the creators of the game engine is absurd? Now if you are referring to C# code itself, that was used to write game logic, then you should have specified that. C# isn't unique to Unity, many other game engines support C# programming language and it's up to the game developers to develop game logic code and how they write game logic code is totally up to them, it has nothing to do with the game engines base code, how the game engine operates etc. I actually have discussed possibilities to rewrite the recipe code with sphereii and TormentedEmu, in theory multiple recipe outputs are possible, but without serious changes for the recipe controller C# code, it's not going to happen any time soon. You can't blame Unity for that, that's just ignorance. Link to comment Share on other sites More sharing options...
SylenThunder Posted December 6, 2018 Share Posted December 6, 2018 Maybe I should be more clear. It's been stated more than once over the years that this wasn't possible with the way Unity works with the XML files. It's also been stated that it's not something they (TFP) care to focus on. From a13... So, MM, with the change on the UI and the workstations, isn't possible yet to recipes to output two (or more) different items? So, boiled meat and corn bread recipes, could also return an empty jar, for example? It doesn't bother me that much, I'm just really curious, because I think you said that, once workstations were in, we could have recipes with more than 1 output... Also, why the Corn Meal Recipe still uses 2 corns to make 2 Corn meals? Before, it conflicted with the seeds recipe. But now that the grid it's gone, can't you make it 1x1? You can't create two items from one recipe. I could fix the corn meal now yes. From a16... I could go farther back, but searching in the archive is a PITA. Link to comment Share on other sites More sharing options...
Subquake Posted December 6, 2018 Share Posted December 6, 2018 It has nothing to do how unity reads XML files, it's how you process the read information. I deal with XML stuff every day at my job. The fact, that TFP don't want to focus their efforts on overwriting recipe code doesn't mean it's impossible to implement. Yes it might be difficult, but not impossible and who knows, some day you might see that in Undead Legacy, because it's something I want to get into at some point, though not a major priority atm. Link to comment Share on other sites More sharing options...
KhaineGB Posted December 6, 2018 Share Posted December 6, 2018 You can also do it with quests... technically. Bit of a pain but I think it was done in valmod to take ammo apart. Side note: We used to be able to take ammo apart and get all 3 things back in around A12 (possibly earlier), so it CAN be done. Link to comment Share on other sites More sharing options...
KhaineGB Posted December 6, 2018 Share Posted December 6, 2018 Really quick, not guaranteed to work example of using the quest system on the stone arrow. items.xml <item name="ammoArrowStone"> <property name="DisplayType" value="ammoArrow"/> <property name="Tags" value="ranged,perkArchery"/> <property name="Meshfile" value="Items/Weapons/Ranged/Bows/WoodenBow/Arrow"/> <property name="HoldType" value="45"/> <property name="HandMeshfile" value="Items/Misc/sackPrefab"/> <property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/> <property name="IsSticky" value="true"/> <property name="StickyOffset" value="0.5"/> <property name="Material" value="Mwood"/> <property name="Stacknumber" value="250"/> <!-- STK ammo --> <property name="FuelValue" value="25"/> <property name="EconomicValue" value="12"/> <property name="EconomicBundleSize" value="5"/> <property class="Action0"> <property name="Class" value="Quest"/> <property name="QuestGiven" value="disassembleStoneArrow"/> <property name="Delay" value="0"/> </property> <property class="Action1"> <property name="Class" value="Projectile"/> <property name="Explosion.ParticleIndex" value="0"/> <!-- no expl. --> <property name="FlyTime" value="0"/> <property name="Gravity" value="-4"/> <property name="LifeTime" value="12"/> </property> <property name="Group" value="Ammo/Weapons,Basics"/> <property name="CraftingSkillGroup" value="craftSkillWeapons"/> <effect_group name="Base Effects" tiered="false"> <!-- ammoArrowStone --> <passive_effect name="EntityDamage" operation="base_set" value="25"/> <passive_effect name="BlockDamage" operation="base_set" value="1"/> <passive_effect name="DamageModifier" operation="perc_set" value="0.1" tags="wood"/> <passive_effect name="DamageModifier" operation="perc_set" value="0" tags="earth,metal,cloth"/> <passive_effect name="ProjectileVelocity" operation="base_set" value="45"/> <passive_effect name="ProjectileStickChance" operation="perc_set" value="0" tags="glass"/> </effect_group> </item> Quests.xml <quest id="disassembleStoneArrow"> <property name="group_name_key" value="disassembleStoneArrow_group" /> <property name="name_key" value="disassembleStoneArrow_name" /> <property name="subtitle" value="Disassemble Stone Arrow" /> <property name="subtitle_key" value="disassembleStoneArrow_subtitle" /> <property name="description_key" value="disassembleStoneArrow_description" /> <property name="icon" value="ui_game_symbol_archery" /> <property name="category_key" value="quest" /> <property name="difficulty" value="veryeasy" /> <property name="offer_key" value="disassembleStoneArrow_offer" /> <property name="shareable" value="false" /> <reward type="Item" id="resourceRockSmall" value="1" /> <reward type="Item" id="resourceWood" value="1" /> <reward type="Item" id="resourceFeather" value="1" /> </quest> Link to comment Share on other sites More sharing options...
Spider Posted December 6, 2018 Share Posted December 6, 2018 Maybe make the arrows scrapable/craftable to the "ArrowHead" and make a repeating quest that's objective is to craft "Arrowhead". Then make the reward for the quest a feather and to start the same quest again. This way every time your broke down an arrow you would get both the head and feather. Its like no one saw my post explaining this already lol Link to comment Share on other sites More sharing options...
KhaineGB Posted December 6, 2018 Share Posted December 6, 2018 Its like no one saw my post explaining this already lol Who are you again? Link to comment Share on other sites More sharing options...
ShankyMcStabber Posted December 6, 2018 Share Posted December 6, 2018 Who are you again? He isn't anyone important, he just made some mod that no one plays (well, aside from the extremely large amount of people who actually love TrueSurvival including all the people who log into my private server to play it). Link to comment Share on other sites More sharing options...
elucidus Posted December 6, 2018 Share Posted December 6, 2018 Its like no one saw my post explaining this already lol It would seem that way, perhaps you should link it. Link to comment Share on other sites More sharing options...
KhaineGB Posted December 6, 2018 Share Posted December 6, 2018 He isn't anyone important, he just made some mod that no one plays (well, aside from the extremely large amount of people who actually love TrueSurvival including all the people who log into my private server to play it). Oh, I know. Just some friendly ribbing. I have great respect for Spider's work. Link to comment Share on other sites More sharing options...
n2n1 Posted December 6, 2018 Share Posted December 6, 2018 Have Subquake has long been done division through quests. @Subquake In truth, i understand that this is certainly not a problem of the engine. I didn't think you'd take it so seriously. And i also thought SylenThunder was joking, too... And Joel often likes "on ears soba posibility to set" in their disclaimer. It's annoying... I also tried to raise this issue a long time ago. PS: they would be easier to say that they are "afraid to generate dup`s because of this method of execution of the recipes". They said so when they removed the crafting grid, but it is certainly a lie. Link to comment Share on other sites More sharing options...
elucidus Posted December 6, 2018 Share Posted December 6, 2018 I'd like to make a modlet to take arrows apart and receive both the feather and arrow head. I did not see any examples of this in recipes.xml, so I assume it is not possible there. I know you get an empty jar when you drink a jar of water, so I tried adding multiple property name="Create_item" to the items.xml, but you only get the last one defined. Thanks! Hey I just finished an ammo disassembly mod, you can find it in my modlet compilation thread. If you only want it to work with arrows and bolts feel free to remvoe the excess code. Link to comment Share on other sites More sharing options...
shinnlly Posted December 7, 2018 Author Share Posted December 7, 2018 Hey I just finished an ammo disassembly mod, you can find it in my modlet compilation thread. If you only want it to work with arrows and bolts feel free to remvoe the excess code. Hey elucidus, awesome mod. Thanks for sharing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.