PDA

View Full Version : Can My Own List Use Effects?



UrsaTeddy
June 4th, 2020, 06:35
Greetings,

I have modified the character sheet for my group to handle something that we use - it is a list of things. Straight forward and it is working as we would expect.

Currently, the list has a numberfield and a stringfield auto-filling from the character data stored in the database. So far so good.

However the numberfield should really not be manually set, but rather state the order in which the item was added ... therefore it should count from 1 upwards.

How would I go about doing this, instead of manual entry? What if I wanted to modify that number to add a tag to it so it would become a string?

In addition, we would like items in the thread to behave similarly to Edges, whereby if you have a specific item in your list then it gives you a bonus to something - obviously using Effects.

Is there something special that needs to be done to the list items to have them process Effects stated in them?

Ikael
June 4th, 2020, 19:21
Is there something special that needs to be done to the list items to have them process Effects stated in them?

You can extend Savage Worlds Effect Framework easily. All you have to do is to register new effect modifier source with EffectManager.registerEffectModifierSourceFactor and implement the logic. Below is simple example of new effect source that is not smart but demonstrates that all Trait rolls would have +1 Booster bonus


function onInit()
EffectManager.registerEffectModifierSourceFactor(b uildMyEffectSource)
end


function buildMyEffectSource(sActorType, nodeActor)
local aEffectSources = {}
if nodeActor then
table.insert(aEffectSources, {
sType = "apply",
sTitle = "Booster",
sContent = "[Trait +1]",
sSource = "custom"
})
end
return aEffectSources
end

UrsaTeddy
June 9th, 2020, 11:29
You can extend Savage Worlds Effect Framework easily. All you have to do is to register new effect modifier source with EffectManager.registerEffectModifierSourceFactor and implement the logic. Below is simple example of new effect source that is not smart but demonstrates that all Trait rolls would have +1 Booster bonus


function onInit()
EffectManager.registerEffectModifierSourceFactor(b uildMyEffectSource)
end


function buildMyEffectSource(sActorType, nodeActor)
local aEffectSources = {}
if nodeActor then
table.insert(aEffectSources, {
sType = "apply",
sTitle = "Booster",
sContent = "[Trait +1]",
sSource = "custom"
})
end
return aEffectSources
end

Thank you for the information, however I am after something a little more specific now.

I have modified the character sheet to contain a list of key words. Each key word modifies the character in some way - for example Agility-1D or Strength+1D.

What I want to be able to do is to enter the keyword in the list with its effect e.g. Buffed [strength+1D] and have it automatically applied.

Actually - as an extra question, how would I make that a permanent change rather than a modification to rolls - i.e. their Strength goes up on the character sheet.