JSONization of NPC classes (skills, NC handling, etc)

So, this is one thing I was pondering might be a useful feature for future endeavors, but not really a must-have for me.

The way NPC classes are handled is currently (mostly) source-only. It rolls for total skill point allotment, assigns set bonuses to certain skills, alters AI personality properties, and tells it what NC itemgroups to use for weapons, clothing, and other starter gear.

It would be useful if these could be handled by JSON files, but I’m unsure how complex that would be. It might need to be handled in steps, I assume. Just expanding on the partially-JSONized NC files would be a good first step. The item groups themselves are accessible to be edited, but being able to have an NPC (or NPC class) reference other item groups would be a useful feature as well.

From total code neewb perspective, I would assume that making it so that you can alter attitudes by json file like how you can alter opinions would be a start. Clothing could be handled by making references to specific npc id.

Possibly. I’m not 100% sure either, but yeah. Turning it into a modular file that can be used to define custom NPC classes would be the most complete way to handle it.

Then one can have your bioweapon NPCs actually spawn with whatever stuff they need that isn’t covered by the scientist or doctor NPC classes.

And I could have NPCs in arcana mod not be fulla derp. For one, I wanted the new mapgen to have an NPC wielding a symbol of judgement, that could be talked out of a fight if you said the right thing.

There were still some hurdles in addition to that, though. ._.

Jsoning a way to change npc attitudes would allow npcs to follow you or be hostile when specific conversation choices are made. The modular clothing file could be the NC_“insert extra here”.json with a way to reference the npc ID so it knows which npc it is referring to. From my experince in batch files (WAY diferrent than c++ I know…) Once you have the string , the id in this case (we do) you can just refer your changes to it.

You can already set NPC attitude though, so you can make them try to start conversation, and set their opening conversation screen, and adjut their attitude during certain responses, etc. >.>

I can only make them start a convo and star with costume dialogue choices but when I ask them to follow me and are successful, the next time I talk to them they simply repeat the convo.

Right. I PM’d you a thing that might be useful to you. <3

Thanks, I will have a look once I have time to work on npc in the morning.

No worries. Hope it proves useful. If I can figure out how to display the red text as well as success odds in a conversation option…

As in the intimidate options? I believe that is hard coded from my source code dig through.

Mierda. ._.

Well, the skill trial effect looked hardocded too, but I got them to work in a JSON file, or at least SEEM to work. So it might be viable.

It could be if the color function is linked with intimidation process. Otherwise there needs to be a manual way to change color in the json files. Like how we can do this here.

Possibly, yeah. I’m not sure, I might have to toy with it some.