• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Is there a way to cleanly implement player choice through an xml modlet?

Aesirkin

New member
The Goal

I'm working on a new mod idea, and would really like to present multiple options and allow the player to choose from among them.  I'm not placing any constraints on the exact method of providing said choice, as I think I could work around several different approaches, and would love to hear ideas.  Though I want something that's clean and intuitive from a UI perspective.

I also welcome suggestions of mods that do something similar that I could look at.

The Mod

For reference, I'd like to create a "follower" system of some sort, that allows you to recruit followers, outfit them with gear, and send them on missions with food and supplies, with hopes that they will succeed and bring back rewards.  I can do this using the PlantGrowing system by making the followers blocks, but could only offer one possible mission (upgrade path) at a time.  Not to mention this is anything but intuitive.

I'd much prefer to let players choose from various mission types or difficulties through some sort of dialog.

What I've Tried

My best thought so far was to create a new NPC and utilize the existing framework used by traders for quest selection.  I tried copying the npcTraderTemplate entity_class, along with the associated entries from npc.xml and dialogs.xml, and added them to my mod with new names and custom localization.  However, I keep getting this error:

Unknown entity -614075134
NullReferenceException: Object reference not set to an instance of an object




At this point I'm wondering if it's possible to create additional NPCs via a mod.  And even so, I'm unclear on how I would control the available options, or if I could hook them up to a game_event or something else that will actually allow me to do much.  Though I've never used NPCs or Dialogs before, so maybe I'm just doing it all wrong.

 
Back
Top