-
-
Notifications
You must be signed in to change notification settings - Fork 4
SF2eHelper.js
SF2eHelper module. Provides a couple of classes overriding PF2eHelper classes
Author: William Leemans
Copyright: William Leemans 2025
This module should allow future-proof management of SF2e resources. Changes may be made that break at some point. Be careful!
-
SF2eHelper
-
static
-
.sf2eHelper ⇐
pf2eHelper
-
.getActorObject(game, actor) ⇒
Object
-
.getActorObject(game, actor) ⇒
-
.sf2ePlayer ⇐
pf2ePlayer
- new exports.sf2ePlayer(game, actor)
-
.credits :
string
-
.upb :
string
-
.valuables :
Array.<Item>
-
._calculatePrice(price) ⇒
array
-
._strike(rawStrike) ⇒
Object
-
.sf2eNPC ⇐
pf2eNPC
- new exports.sf2eNPC(game, actor)
-
.credits :
string
-
.upb :
string
-
.valuables :
Array.<Item>
-
._calculatePrice(price) ⇒
array
-
._strike(rawStrike) ⇒
Object
-
.sf2eHelper ⇐
-
inner
-
~_calculatePrice(price) ⇒
array
-
~_strike(rawStrike, strike) ⇒
Object
-
~_calculatePrice(price) ⇒
-
static
Kind: static class of SF2eHelper
Extends: pf2eHelper
Determine what type of actor we're dealing with and return an object which can parse all data
Kind: static method of sf2eHelper
Param | Type | Description |
---|---|---|
game | Object |
the Foundry VTT game object |
actor | Object |
the Foundry VTT actor object |
sf2e player character class
Kind: static class of SF2eHelper
Extends: pf2ePlayer
-
.sf2ePlayer ⇐
pf2ePlayer
- new exports.sf2ePlayer(game, actor)
-
.credits :
string
-
.upb :
string
-
.valuables :
Array.<Item>
-
._calculatePrice(price) ⇒
array
-
._strike(rawStrike) ⇒
Object
Param | Type | Description |
---|---|---|
game | Object |
the Foundry VTT game object |
actor | Object |
the Foundry VTT actor object |
Return the number of credits the character has
Kind: instance property of sf2ePlayer
Return the number of upb the character has
Kind: instance property of sf2ePlayer
actor valuables
Kind: instance property of sf2ePlayer
Calculate the price based on the price object
Kind: instance method of sf2ePlayer
Returns: array
- an array containing all coins
Param | Type | Description |
---|---|---|
price | Object |
the price object |
Return a single strike with all calculated information
Kind: instance method of sf2ePlayer
Returns: Object
- formatted strike
Param | Type |
---|---|
rawStrike | Object |
sf2e player NPC class
Kind: static class of SF2eHelper
Extends: pf2eNPC
-
.sf2eNPC ⇐
pf2eNPC
- new exports.sf2eNPC(game, actor)
-
.credits :
string
-
.upb :
string
-
.valuables :
Array.<Item>
-
._calculatePrice(price) ⇒
array
-
._strike(rawStrike) ⇒
Object
Param | Type | Description |
---|---|---|
game | Object |
the Foundry VTT game object |
actor | Object |
the Foundry VTT actor object |
Return the number of credits the character has
Kind: instance property of sf2eNPC
Return the number of upb the character has
Kind: instance property of sf2eNPC
actor valuables
Kind: instance property of sf2eNPC
Calculate the price based on the price object
Kind: instance method of sf2eNPC
Returns: array
- an array containing all coins
Param | Type | Description |
---|---|---|
price | Object |
the price object |
Return a single strike with all calculated information
Kind: instance method of sf2eNPC
Returns: Object
- formatted strike
Param | Type |
---|---|
rawStrike | Object |
Calculate the price based on the price object
Kind: inner method of SF2eHelper
Returns: array
- an array containing all coins
Param | Type | Description |
---|---|---|
price | Object |
the price object |
Return a single strike with all calculated information
Kind: inner method of SF2eHelper
Returns: Object
- formatted strike
Param | Type |
---|---|
rawStrike | Object |
strike | Object |