|
|||
Views: 850,200 | 04-26-24, 01:49 pm | ||
PillowShout |
Posted on 02-13-13, 07:35 pm (revision 3)
|
Posts: 59/105 Since: 12-06-12 Last post: 4028 days Last view: 4010 days |
So I had an idea. What if rather than using hardcoded loot sets to fill things like chests and arm wild NPCs, we used a loot table to populate their inventories? I know this is already done to some extent with the costumes, so I'm sure it's something you've at least considered, but I wanted to come up with a system that we could use to cover all items and objects in the game rather than just clothing on characters. Here's a small mock-up of what I was thinking:
Alternatively this could also be done with tokenization like the costumes are, so I guess it's just a matter of preference or ease. Another advantage of using a system that's a little more generic is that we could create separate loot sets for wild and town based NPCs that are indifferent to body type.
One last way that loot tables can really add some interesting diversity is through the use of filters. For instance, you could filter based on the possession of certain flag tokens, or just by gender, race or culture. Alternatively, you could also filter by region:
Anyway, these are just some ideas. I'm sure you could come up with some better syntax, but I wanted to give you some idea of what we could do with a system like this. Let me know what you think! Lead writer on Noxico (and sometimes programmer or designer) <br> |
Kawa |
Posted on 02-13-13, 07:43 pm
|
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets
Posts: 163/344 Since: 06-08-12 Last post: 1698 days Last view: 1238 days |
Saving this page for later study.
I don't just program Noxico... |
Kawa |
Posted on 03-07-13, 06:18 pm
|
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets
Posts: 176/344 Since: 06-08-12 Last post: 1698 days Last view: 1238 days |
This is now a thing. Calling WorldGen.GetLoot(string target, string type) returns a list of tokens that can be directly added to a container or a character's inventory, like the now obsoleted InventoryItem.RollContainer(Character owner, string type) does, using the following data: <pre> </pre>Many but not all items have been marked to allow this. I don't just program Noxico... |
PillowShout |
Posted on 03-07-13, 06:53 pm
|
Posts: 70/105 Since: 12-06-12 Last post: 4028 days Last view: 4010 days |
Looks nice! Definitely going to have some fun playing around with this. :awsum:
Lead writer on Noxico (and sometimes programmer or designer) <br> |
Kawa |
Posted on 03-08-13, 07:03 pm
|
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets
Posts: 178/344 Since: 06-08-12 Last post: 1698 days Last view: 1238 days |
Considering the following: split up GetLoot into GetRandomLoot and GetLoots. One returns all lootsets that match the type, target, and filters, and the other picks one at random. Then, to create a villager and their personal containers, call GetLoots. Pick one out from the results and give that to the NPC, then put some of the rest in their wardrobe and such. Also, keep separate lootsets for clothing, tools, and weapons. If a villager has a wardrobe, get multiple clothing sets as above. If not, get only one. Same deal with chests and weapon racks or whatnot. That way, for a house with two inhabitants, two beds, two wardrobes, and one chest, there'd be two clothing lootsets worn, N clothing sets stored in their respective wardrobes, two tool sets carried, and N tool and other item sets in the chest. Sound good? I don't just program Noxico... |
PillowShout |
Posted on 03-08-13, 08:03 pm
|
Posts: 72/105 Since: 12-06-12 Last post: 4028 days Last view: 4010 days |
Yeah, that sounds like it should work just fine. I had always intended that multliple loot sets could be combined and given to an entity, so this looks like the start of a good system for that. I guess we just need a standard way to differentiate the different types of sets so that they end up in the right places.
Lead writer on Noxico (and sometimes programmer or designer) <br> |
Kawa |
Posted on 03-08-13, 08:10 pm
|
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets
Posts: 179/344 Since: 06-08-12 Last post: 1698 days Last view: 1238 days |
I was thinking of taking the <code>type="baker"</code> part and replacing that with a <code><filter></code> element. That way, we can query for all <i>NPC Clothing</i> -- GetLoots'll then return a baker's costume <i>and</i> any other clothing sets, which can then be distributed. If we sort the more specific stuff such as a baker's costume at the top of the file and the less specific stuff such as typical mens clothing further down, like with the scene data, GetLoot's returned list will have the costume as [0], for trivial distribution. I don't just program Noxico... |
Kawa |
Posted on 03-11-13, 01:36 pm
|
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets
Posts: 181/344 Since: 06-08-12 Last post: 1698 days Last view: 1238 days |
GetLoot split up, Character.ApplyCostume redone to use the results. Much shorter now. Short is good.
I don't just program Noxico... |
PillowShout |
Posted on 03-11-13, 07:02 pm
|
Posts: 73/105 Since: 12-06-12 Last post: 4028 days Last view: 4010 days |
Much shorter and much cleaner. I'm definitely liking how this is coming together. ;)
Lead writer on Noxico (and sometimes programmer or designer) <br> |
Kawa |
Posted on 03-11-13, 07:42 pm
|
<i>Prophet of Celestia</i><br>Baka on the streets, senpai in the sheets
Posts: 182/344 Since: 06-08-12 Last post: 1698 days Last view: 1238 days |
All it really needs now is a way to set colors on items that support them.
I don't just program Noxico... |