FG Spreadshirt Swag
Page 5 of 15 First ... 34567 ... Last
  1. #41
    Quote Originally Posted by rmilmine View Post
    There is one bug I've not been able to resolve and I'm hoping someone can point me in the right direction to fix it after this post.
    If you haven't visited the action tab before adding the item is doesn't properly create the action item.Attachment 36810
    I figured it out and fixed it!

    It's because of SpellManager.addSpell.
    Line 102 of SpellManager uses .getChild rather than .createChild which means that the spell level isn't created (not entirely sure why this works at all, honestly).
    While this should probably be changed upstream in 3.5E, a fix for your extension is to add this right before addSpellToActionList in char_invlist_ACIM.lua:
    Code:
    local function addSpell(nodeSource, nodeSpellClass, nLevel)
    	-- Validate
    	if not nodeSource or not nodeSpellClass or not nLevel then
    		return nil;
    	end
    	
    	-- Create the new spell entry
    	local nodeTargetLevelSpells = nodeSpellClass.createChild("levels.level" .. nLevel .. ".spells");
    	if not nodeTargetLevelSpells then
    		return nil;
    	end
    	local nodeNewSpell = nodeTargetLevelSpells.createChild();
    	if not nodeNewSpell then
    		return nil;
    	end
    	
    	-- Copy the spell details over
    	DB.copyNode(nodeSource, nodeNewSpell);
    	
    	-- Convert the description field from module data
    	SpellManager.convertSpellDescToString(nodeNewSpell);
    
    	local nodeParent = nodeTargetLevelSpells.getParent();
    	if nodeParent then
    		-- Set the default cost for points casters
    		local nCost = tonumber(string.sub(nodeParent.getName(), -1)) or 0;
    		if nCost > 0 then
    			nCost = ((nCost - 1) * 2) + 1;
    		end
    		DB.setValue(nodeNewSpell, "cost", "number", nCost);
    
    		-- If spell level not visible, then make it so.
    		local sAvailablePath = "....available" .. nodeParent.getName();
    		local nAvailable = DB.getValue(nodeTargetLevelSpells, sAvailablePath, 1);
    		if nAvailable <= 0 then
    			DB.setValue(nodeTargetLevelSpells, sAvailablePath, "number", 1);
    		end
    	end
    	
    	-- Parse spell details to create actions
    	if DB.getChildCount(nodeNewSpell, "actions") == 0 then
    		SpellManager.parseSpell(nodeNewSpell);
    	end
    	
    	return nodeNewSpell;
    end
    and then to change this line in addSpellToActionList:
    Code:
    local nodeNew = SpellManager.addSpell(nodeSpell, nodeNewSpellClass, nSpellLevel);
    to be:
    Code:
    local nodeNew = addSpell(nodeSpell, nodeNewSpellClass, nSpellLevel);
    Last edited by bmos; August 28th, 2020 at 20:47.

  2. #42
    Hey Dude,

    Tower Shields should not appear as weapons in the action tab, might want to put an exception somewhere forbidding item with "tower" or "Tower" as you cannot bash with a T-shield,

  3. #43
    Quote Originally Posted by Bretwulf View Post
    Hello, Rmilmine! Your extension is working wonders for me, a real time saver, coupled with the ultimate equipment modules.
    But i have a question: It is a intended behaviour that the Animal buffs (Bull's Strenght and such) are not parsed and added to the actions tab? I'm having a problem only with this specific spells haha
    If they are an item with charges then yes, as it should have uses on the spell. So potions, wands, scrolls of any spell should show up in the action tab.
    Been a while since I looked at any of this. trying to fix things again.

  4. #44
    Quote Originally Posted by bmos View Post
    I figured it out and fixed it!

    It's because of SpellManager.addSpell.
    Line 102 of SpellManager uses .getChild rather than .createChild which means that the spell level isn't created (not entirely sure why this works at all, honestly).
    While this should probably be changed upstream in 3.5E, a fix for your extension is to add this right before addSpellToActionList in char_invlist_ACIM.lua:
    Code:
    local function addSpell(nodeSource, nodeSpellClass, nLevel)
    	-- Validate
    	if not nodeSource or not nodeSpellClass or not nLevel then
    		return nil;
    	end
    	
    	-- Create the new spell entry
    	local nodeTargetLevelSpells = nodeSpellClass.createChild("levels.level" .. nLevel .. ".spells");
    	if not nodeTargetLevelSpells then
    		return nil;
    	end
    	local nodeNewSpell = nodeTargetLevelSpells.createChild();
    	if not nodeNewSpell then
    		return nil;
    	end
    	
    	-- Copy the spell details over
    	DB.copyNode(nodeSource, nodeNewSpell);
    	
    	-- Convert the description field from module data
    	SpellManager.convertSpellDescToString(nodeNewSpell);
    
    	local nodeParent = nodeTargetLevelSpells.getParent();
    	if nodeParent then
    		-- Set the default cost for points casters
    		local nCost = tonumber(string.sub(nodeParent.getName(), -1)) or 0;
    		if nCost > 0 then
    			nCost = ((nCost - 1) * 2) + 1;
    		end
    		DB.setValue(nodeNewSpell, "cost", "number", nCost);
    
    		-- If spell level not visible, then make it so.
    		local sAvailablePath = "....available" .. nodeParent.getName();
    		local nAvailable = DB.getValue(nodeTargetLevelSpells, sAvailablePath, 1);
    		if nAvailable <= 0 then
    			DB.setValue(nodeTargetLevelSpells, sAvailablePath, "number", 1);
    		end
    	end
    	
    	-- Parse spell details to create actions
    	if DB.getChildCount(nodeNewSpell, "actions") == 0 then
    		SpellManager.parseSpell(nodeNewSpell);
    	end
    	
    	return nodeNewSpell;
    end
    and then to change this line in addSpellToActionList:
    Code:
    local nodeNew = SpellManager.addSpell(nodeSpell, nodeNewSpellClass, nSpellLevel);
    to be:
    Code:
    local nodeNew = addSpell(nodeSpell, nodeNewSpellClass, nSpellLevel);
    Thanks I've added this and given you credit for the change.

  5. #45
    Quote Originally Posted by Zygmunt Molotch View Post
    Hey Dude,

    Tower Shields should not appear as weapons in the action tab, might want to put an exception somewhere forbidding item with "tower" or "Tower" as you cannot bash with a T-shield,
    Thanks I have a fix for this. Simple really I wasn't checking to see if the shield had any damage associated with it. If it doesn't it won't create an action item any longer.

  6. #46
    I've uploaded verions 1.0.6. on the first post.
    This should fix the bug with having to visit the action tab before doing anything in the inventory.
    I also fixed the bug with tower shields. If a shield has not a blank or nil damage value it will not create an action item for it.

  7. #47
    I incorrectly made the ext file, putting the folder instead of the contents of the folder in the ext file.
    I updated the first post.

  8. #48
    Quote Originally Posted by Bretwulf View Post
    Hello, Rmilmine! Your extension is working wonders for me, a real time saver, coupled with the ultimate equipment modules.
    But i have a question: It is a intended behaviour that the Animal buffs (Bull's Strenght and such) are not parsed and added to the actions tab? I'm having a problem only with this specific spells haha
    I already messaged bretwulf about this, but here it is in case anyone else has this issue:
    This is because of the apostrophe in the item's name. An easy workaround is to remove that character from the wand's name so that "Wand of Bull's Strength (CL 5) [15 charges]" becomes "Wand of Bulls Strength (CL 5) [15 charges]".

  9. #49
    I flat out cannot get this to work. Not sure what I'm doing wrong, but I'm getting nothing in the Actions Tab. Created a Wand of Cure Light Wounds in a parcel following the example on pg 2 of the Wand of Invisibility. Dragged the parcel to the Party Sheet. Dragged the wand to the character Inventory Tab. Nothing in the Action Tab. Is there something else I need to do?

  10. #50
    Quote Originally Posted by SgtPrylo View Post
    I flat out cannot get this to work. Not sure what I'm doing wrong, but I'm getting nothing in the Actions Tab. Created a Wand of Cure Light Wounds in a parcel following the example on pg 2 of the Wand of Invisibility. Dragged the parcel to the Party Sheet. Dragged the wand to the character Inventory Tab. Nothing in the Action Tab. Is there something else I need to do?
    Post a picture of the item and list what other extensions you use (if any). It'll help identify the issue.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in