[Beta Release] Spell Manager 3.0.0 for b86

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by jsharen »

Has anyone programmed in Oracle into the new spell framework?

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by jsharen »

When I try to create an Oracle using the Model on existing class, basing the template class on sorcerer I get an error.

The only thing I change when using this option is to base the classes spells on Pathfinder: Cleric. All the rest I accept the default.

Invalid condition in IF(checknum > -1) roll option.       
Statement options (if any): if(checknum > -1)       
Statement Body : stopeet = 1; levelcheck = levelcheck-1

Any thoughts?

Ganoran
Kobold
Posts: 1
Joined: Sat Sep 10, 2011 9:21 pm

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by Ganoran »

I'm having a problem converting spells. I've tried it with both cleric and druid using the pathfinder book. It still outputs the original spell name and output rather than the conversion output.

I'm using the version combined into the 1.3b86.03 D&D3.5_Pathfinder framework.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by aliasmask »

Here's another patch that fixes the level up problem for cleric with domains.
||| Adjust Class Level Up |||

Code: Select all

@@ @Adjust Class Level Up
@PROPS@ fontColor=yellow ; autoExecute=true ; fontSize=11pt ; sortBy=3 ; color=blue ; playerEditable=true ; applyToSelected=false ; group=1 Spell Management ; tooltip= ; minWidth=147 ; 
[h: passed = macro.args]

[h: classchanged = json.get(passed, "Class")]
[h: thisCL = json.get(passed, "Class Level Now")]
[h: thisCLbefore = json.get(passed, "Class Level Before")]

[h: bookcasedata = getLibProperty("Bookcase","Lib:spells")]
[h: classdata = json.get(CasterInfo, classchanged)]
[h: source_obj = json.get(classdata, "Source")]
[h: shelfname = json.get(source_obj, "Shelf")]
[h: bookname = json.get(source_obj, "Book")]
[h: shelfdata = json.get(bookcasedata, shelfname)]
[h: bookdata = json.get(shelfdata, bookname)]
[h: classdetails = json.get(bookdata, classchanged)]
[h: thisdetails = classdata]

[h: CaLcode = json.get(classdetails, "Caster Level Code")]
[h: thisboost = json.get(thisdetails, "Caster Boost")]
[h: boostCL = thisCL+thisboost]
[h: boostCLbefore = thisCLbefore+thisboost]
[h: thisCL = boostCL]
[h: thisCaL = eval(CaLcode)]
[h: thisCL = json.get(passed, "Class Level Now")]

[h: classMSL = json.get(classdetails, "Max Spell Level")]
[h: thisMSL = listGet(classMSL, boostCL)]
[h: thisMSLbefore = listGet(classMSL, boostCLbefore)]
[h: classnumberknown = json.get(classdetails,"Number Known")]
[h: thisnumberknown = json.get(classnumberknown, "Level "+boostCL)]
[h: classSPD = json.get(classdetails, "Spells Per Day")]
[h: thisSPD = json.get(classSPD, "Level "+boostCL)]
[h: lowestlevelspell = json.get(classdetails, "Lowest Level Spell")]
[h: convertlistsall = json.get(classdetails, "Convert Lists")]
[h, if(json.type(convertlistsall)!="OBJECT"): convertlistsall = "{}"]
[h: convertoptions = json.fields(convertlistsall)]
[h, if(convertoptions == ""): convertoptions = listSort(convertoptions, "A")]

[h: thisdetails = json.set(thisdetails,
	"Max Spell Level", thisMSL,
	"Number Known", thisnumberknown,
	"Caster Level", boostCL,
	"Class Level", thisCL,
	"Spells Per Day", thisSPD
)]

[h: classnumdomains = json.get(classdetails, "Number of Domains")]
[h: classnumspecs = json.get(classdetails, "Number of Specialties")]

[h, if(thisMSL>thisMSLbefore && json.get(classdetails,"Knows All")=="Yes"), code:{
	[classspelllists = json.get(classdetails, "Spell Lists")]
	[charsspelllists = json.get(thisdetails, "Spells Known")]
	[if(json.type(charsspelllists)!="OBJECT"): charsspelllists = "{}"]
	[num = thisMSL]
	[count(thisMSL-thisMSLbefore),code:{
		[thislist = json.get(classspelllists, "Level "+num)]
		[charsspelllists = json.set(charsspelllists, "Level "+num, thislist)]
		[num = num-1]
	}]
	[if(lowestlevelspell == 0 && thisMSLbefore==0), code:{
		[thislist = json.get(classspelllists, "Level 0")]
		[charsspelllists = json.set(charsspelllists, "Level 0", thislist)]
	}; {}]
	[thisdetails = json.set(thisdetails, "Spells Known", charsspelllists)]
}; {}]

[h, if(classnumdomains > 0), code:{
	[pass = json.set("{}", "Classchanged", classchanged, "Classdata", classdata)]
	[macro("Domain Check@Lib:spells"): pass]
	[returnj = macro.return]
   [h, if(! json.isEmpty(returnj)), code: {
      [chardomainspells = json.get(returnj, "Domain Spells")]
      [chardomains = json.get(returnj, "Domains")]
      [classdomainsperday = json.get(classdetails, "Domain Spells Per Day")]
      [thisdomainsperday = json.get(classdomainsperday, "Level "+boostCL)]
      [thisdetails = json.set(thisdetails, "Domain Spells Per Day", thisdomainsperday, "Domain Spells", chardomainspells, "Domains", chardomains)]
   };{}]
}; {}]

[h, if(classnumspecs > 0), code:{
	[pass = json.set("{}", "Classchanged", classchanged, "Classdata", classdata)]
	[macro("Specialty Check@Lib:spells"): pass]
	[returnj = macro.return]
	[charspeclist = json.get(returnj, "Specialties")]
	[charprohiblist = json.get(returnj, "Prohibitions")]
	[cancastprohibs = json.get(returnj, "Can Cast Prohibs")]
	[thisspecialtiesperday = json.get(json.get(classdetails, "Specialty Spells Per Day"), "Level "+boostCL)]
	[thisdetails = json.set(thisdetails, "Specialty Spells Per Day", thisspecialtiesperday, "Specialties", charspeclist, "Prohibitions", charprohiblist, "Can Cast Prohibs", cancastprohibs)]
}; {}]

[h, if(json.length(convertlistsall)>1),code:{
	[screen = input(
		"convertpick|"+convertoptions+",(None)|Choose which conversion list you will use.|list|value=string"
	)][abort(screen)]
}; {
	[if(json.length(convertlistsall)==1): convertpick = convertoptions; convertpick = "(None)"]
}]

[h, if(convertpick=="(None)"): convertlist = ""; convertlist = json.get(convertlistsall, convertpick)]
[h: thisdetails = json.set(thisdetails, "Convert List", convertlist)]

[h: charSAdata = json.get(thisdetails, "SpecAbil Data")]
[h: chargroupdata = json.get(thisdetails, "SpecAbil Groups")]
[h: libSAdata = json.get(classdetails, "SpecAbil Data")]
[h: optSAdata = json.get(libSAdata, "Optional Abilities")]
[h: optgroupdata = json.get(libSAdata, "Optional Groups")]
[h: DPdata = json.get(libSAdata, "Decision Points")]
[h: num = thisCLbefore+1]
[h, while(num <= thisCL), code:{
	[thislevelDPdata = json.get(DPdata, "Level "+num)]
	[if(json.type(thislevelDPdata) != "object"): thislevelDPdata = "{}"]
	[foreach(DPname, thislevelDPdata), code:{
		[thisdecisiondata = json.get(thislevelDPdata, DPname)]
		[pass = json.set("{}", "CharSAdata", charSAdata, "Decisiondata", thisdecisiondata, "OptSAdata", optSAdata, "Decisionlevel", num, "Chargroupdata", chargroupdata, "Optgroupdata", optgroupdata)]
		[macro("Levelup Decision@this"): pass]
		[return_obj = macro.return]
		[charSAdata = json.get(return_obj, "CharSAdata")]
		[chargroupdata = json.get(return_obj, "Chargroupdata")]
		[thisdetails = json.set(thisdetails, "SpecAbil Data", charSAdata, "SpecAbil Groups", chargroupdata)]
	}]
	[num = num+1]
}]

[h: charclassdata = json.get(CasterInfo, classchanged)]
[h, if(json.type(charclassdata)!="object"): charclassdata = "{}"]
[h: newcharclassdata = json.merge(charclassdata, thisdetails)]
[h: newCasterInfo = json.set(CasterInfo, classchanged, newcharclassdata)]

[macro("Alphabetize Object@this"): newCasterInfo]
[h: CasterInfo = macro.return]

[macro("Ability Adjustments@this"): classchanged]

!!
After this line: [macro("Domain Check@Lib:spells"): pass] it returns "" if no changes are made, like from level 1 to level 2, but the code after that doesn't take that in to account.

Gekko
Kobold
Posts: 5
Joined: Thu Oct 06, 2011 8:10 am
Location: Berlin, Germany
Contact:

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by Gekko »

I tried to create the Pathfinder Alchemist class.
I failed to enter the code for the number of bombs. It's CASTER LEVEL + INT-MODIFIKATOR.
Actually I don't find the Alchemist's CL in the properties.

I used (because my test alchemist is LVL 4):
4+floor((Intelligence-10)/2)
Could someone tell me, what is the correct expression for the alchemist's level?

Gekko
Kobold
Posts: 5
Joined: Thu Oct 06, 2011 8:10 am
Location: Berlin, Germany
Contact:

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by Gekko »

Hi aliasmask,

I copied the whole code in the "Adjust Class Level up"-Macro in the Lib:spells3-Token (and replaced all the code that was there before). Afterwards I tried to level up a PF-cleric from Lvl 5 to Lvl 6.

I get a 'Unbekannter JSON Typ "" in Funktion "json.get".' which means 'Unknown JSON Typ "" in Function "json.get".'

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by plothos »

I have finally had a chance to set up the Pathfinder skills for the core rulebook (thanks Amtrak for the extra 4 hours crammed into that seat the other day), and even had a chance to throw in a first pass at a "local cheating" macro to allow for putting back accidentally expended spells and the like.

Please test this out, if you use PF.
Attachments
Latest PF Update.cmpgn
(1.36 MiB) Downloaded 128 times
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by jsharen »

I get an error trying to build a pathfinder Oracle.

Create new bookshelf called Custom.

Create new class.

Copy Sorcerer, rename to oracle.
Click Ok
Click Ok to Class limits number of spells known.
Model Spell list on Cleric
Model number of spells known on Sorcerer
Model Spells per day on sorcerer

I get the following error:

   Invalid condition in IF(checknum > -1) roll option.       
Statement options (if any): if(checknum > -1)       
Statement Body : stopeet = 1; levelcheck = levelcheck-1

Is anyone else able to create a custom class?

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by plothos »

Thanks, I'll look into it.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

Gekko
Kobold
Posts: 5
Joined: Thu Oct 06, 2011 8:10 am
Location: Berlin, Germany
Contact:

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by Gekko »

jsharen wrote:Is anyone else able to create a custom class?
Yes. but only from scratch. Otherwise I get the same error.

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by plothos »

I'm pretty sure I know what the problem is there. Will get to it this weekend at the latest.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by plothos »

Okay, I have used AM's patches to fix the bugs he found and killed, and I have found and killed the issue with copying SPD from pathfinder classes.

If this works out, I may start a massive reworking of the way data is saved on the Lib, because performance is dragging. This should not affect how data is saved on player tokens, so it may not cause problems for tokens folks have made. It might, however, cause problems for you if you've created caster classes in the bookcase and want to save them. You might have to export those and wait for my reworking of the import/export function to load them onto the new lib.

This will be a while in coming, and I think I can do it without messing anybody up too badly, so hopefully this is stable enough to lose the beta tag. I'll let folks fiddle with it a bit more, and see if further bugs crop up.
Attachments
PSM Upgrade 11-10-11.cmpgn
(1.36 MiB) Downloaded 116 times
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by jsharen »

*CHEER*

Able to create Oracle now! Excellent, thanks Plo!


I do however have two new errors.

1) Using Local cheating, and trying to change the number of spells known (Oracle gets bonus spells based on their Mystery), I get the following error:
Function "setProperty" requires at least 2 parameters; 1 were provided.

2) Casting an Orison gives me:
Unknown macro "Spont Infcast Wrap@Lib:spells".

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by plothos »

Thanks. I'm on it.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: [Beta Release] Spell Manager 3.0.0 for b86

Post by jsharen »

Hey Plo any updates soon?

Also has anyone added summoner and witch to the database?

Thanks!

Post Reply

Return to “Drop-In Macro Resources”