Notice: If the game stops working after an update, it might be a savegame incompatibility. Remove your savegame folder and try again before posting about it.
Registration has an extra hurdle now: There have been advertisement bots, so I added a security keyword to registration. Deal with it.
  0 users browsing Suggestion Box. | 1 bot  
Main » Suggestion Box » More randomized loot for equipment coolbeans
Pages: 1
Posted on 12-23-13, 05:37 am (revision 1)

 

Posts: 3/13
Since: 11-14-13

Last post: 3451 days
Last view: 3449 days
I am not sure if this suggestion was discussed earlier (I believe it was just about rings). But what if all item slots, as well as some weapons. My thought on this take is to have all items use an "ID" system, such as a string of numbers- or heck, even hex for more combinations, from there, this code is parsed through a decoder and would create all the information needed for it all within the code.

I decided to make a test application, a c# console app, to test how this works, and I am able to generate 10,000,000,000 unique items (1 billion uniques for each item type, so 1Bil rings, 1 bil necklaces, etc.) this allows for unique descriptions for each item (I made a very sloppy switch statement on appending strings, there are better ways to do this, but it gets the job done).

The loot generation can do something to check to see if items are cursed (cannot be removed by normal means) or valuable (gold value * constant so the item is worth more than normal). I did this by pretty much taking random digits, and making some simple algorithm modulus MaxValuesInADigit. One can use these algorithms to ensure that no single item is overpowered, by having the stats inverse to eachother, for example, using "Absolute value of ((some digits of the ID% max) - 1/2*max)" for the strength attribute, but use the "negative absolute value of ((some digits of the ID % max) - 1/2*max) + max" for the speed attribute. using inverse equations will ensure that one cannot get an item with the best stats, for as one stat has a higher value, the other(s) may be lower. For each digit in the item's ID, from 0 to MAX, one can use these simple things for balancing item values:
----
x=y line: as the ID digit value approach the max number, that stat will be higher
x=-y+Max line: as the digit approach 0, the stat will be higher

Absolute value: as the digit approach the edges, 0 and Max, the value will be higher
-abs+max: as the digit approach 1/2 max, the value will be higher

..and I guess a sin/cos can be used in a way to contrast eachother..
----
I have a screenshot of the some-what working of the item system here: (yes, the stats are all 0, I only have the descriptions and cursed/valueable item working, as well as not adding a/an properly to displaying the descriptions; the main point of the descriptions, is that each item contains item type, main color, secondary color, material type, metal type, condition, metal condition, weight type, and sharpness- for weapons.)



If you want me to post the code somewhere if you are curious on what I did, I can post the stuff somewhere
Posted on 12-24-13, 12:02 pm
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 295/344
Since: 06-08-12

Last post: 1670 days
Last view: 1210 days
That's certainly interesting. I doubt I'd use this in Noxico, but please do share your work as it is legitimately interesting.

I don't just program Noxico...
Posted on 12-25-13, 08:03 pm

 

Posts: 4/13
Since: 11-14-13

Last post: 3451 days
Last view: 3449 days
Alright, I will get my code up as soon as possible- but I will say this- I have much better coding practices is mind after I made the console app, such as replacing most of the descriptions (which is hard-coded in), and replacing them with a function that will read a file, and store all the words into a list of items. This way, instead of having a hundred-something lines of code initializing the description arrays, I can just say "Read the colorType.whateverFile, and store all colors into a list".
Posted on 12-25-13, 10:37 pm
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets

Posts: 296/344
Since: 06-08-12

Last post: 1670 days
Last view: 1210 days
Posted by infomaniacThis way, instead of having a hundred-something lines of code initializing the description arrays, I can just say "Read the colorType.whateverFile, and store all colors into a list".
Ah, Terraria syndrome. :lawl:

I don't just program Noxico...
Pages: 1
Main » Suggestion Box » More randomized loot for equipment coolbeans