Jump to content

How do you make a custom Core Argument?


Playr10

Recommended Posts

It's late and I'm tired but here's my best attempt at explaining:

Arguments, bounties, inceptions, and cores are all types of Modifiers. You can add a modifier in the negotiation_data of a CharacterDef or in a local Modifiers container in your own lua content files, so long the file the modifier is in is required/loaded before your character-defining file in the modinit OnLoad order.

Here's an example of creating a Core Argument in my WIP playable Arint mod's negotiation_cards file:

local negotiation_defs = require "negotiation/negotiation_defs"
local CARD_FLAGS = negotiation_defs.CARD_FLAGS
local EVENT = negotiation_defs.EVENT

local MODIFIERS =
{
	PC_ARINT_CORE =
	{
		name = "Well Connected",
		desc = "Your opponent's arguments come into play with 1 less resolve.",
		modifier_type = MODIFIER_TYPE.CORE,
		icon = "negotiation/modifiers/arint_weakness.tex",
		
		event_handlers = 
		{
			[ EVENT.MODIFIER_ADDED ] = function ( self, modifier, source )
				if modifier.negotiator == self.anti_negotiator
				and modifier.max_resolve ~= nil
				and modifier.modifier_type == MODIFIER_TYPE.ARGUMENT then
					modifier:ModifyResolve(-1, self)
				end
			end
		}
	},
}

for i, id, def in sorted_pairs( MODIFIERS ) do
    Content.AddNegotiationModifier( id, def )
end

Then in my file with my CharacterDef, there's this block:

negotiation_data =
{
	behaviour =
        {
            OnInit = function( self, difficulty )
                self.negotiator:AddModifier( "PC_ARINT_CORE" )
            end,
        }
},

Thus, my custom negotiator loads in with a custom Core Argument. Hope that's enough of an example to point you in the right direction.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...