Starfinder Playlist
Page 2 of 53 First 12341252 ... Last
  1. #11
    Quote Originally Posted by Sudain View Post
    suggestion:automatic re-rolling of miss chance for players that have the blind-fight feats.
    Ammunition Manager v1.9 now automates blind-fight's re-roll-on-miss function for players and NPCs.
    The special circumstance of blink is not included in the automation at this time.
    EDIT: this is not quite right by the rules. will continue working on it.

    Kelrugem, perhaps you can bring this into your extension?
    I add my special ability search function:
    Code:
    ---	This function checks NPCs and PCs for special abilities.
    local function hasSpecialAbility(rActor, sSearchString, bFeat, bTrait, bSpecialAbility, bEffect)
    	if not rActor or not sSearchString then
    		return false
    	end
    	local nodeActor = rActor.sCreatureNode;
    
    	if bEffect and EffectManager35E.hasEffectCondition(rActor, sSearchString) then
    		return true
    	end
    
    	local sSearchString = string.lower(sSearchString);
    	local sSearchString = string.gsub(sSearchString, '%-', '%%%-');
    	if ActorManager.isPC(nodeActor) then
    		if bFeat then
    			for _,vNode in pairs(DB.getChildren(nodeActor .. '.featlist')) do
    				local sFeatName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
    				if sFeatName and string.match(sFeatName, sSearchString .. ' %d+', 1) or string.match(sFeatName, sSearchString, 1) then
    					return true
    				end
    			end
    		end
    		if bTrait then
    			for _,vNode in pairs(DB.getChildren(nodeActor .. '.traitlist')) do
    				local sTraitName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
    				if sTraitName and string.match(sTraitName, sSearchString .. ' %d+', 1) or string.match(sTraitName, sSearchString, 1) then
    					return true
    				end
    			end
    		end
    		if bSpecialAbility then
    			for _,vNode in pairs(DB.getChildren(nodeActor .. '.specialabilitylist')) do
    				local sSpecialAbilityName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
    				if sSpecialAbilityName and string.match(sSpecialAbilityName, sSearchString .. ' %d+', 1) or string.match(sSpecialAbilityName, sSearchString, 1) then
    					return true
    				end
    			end
    		end
    	else
    		local sSpecialQualities = string.lower(DB.getValue(nodeActor .. '.specialqualities', ''));
    		local sSpecAtks = string.lower(DB.getValue(nodeActor .. '.specialattacks', ''));
    		local sFeats = string.lower(DB.getValue(nodeActor .. '.feats', ''));
    
    		if bFeat and string.find(sFeats, sSearchString) then
    			return true
    		elseif bSpecialAbility and (string.find(sSpecAtks, sSearchString) or string.find(sSpecialQualities, sSearchString)) then
    			return true
    		end
    	end
    	
    	return false
    end
    and modify this part of onMissChance:
    Code:
    	if nTotal <= nMissChance then
    		rMessage.text = rMessage.text .. " [MISS]";
    		removeVar = true;
    		if rTarget then
    			rMessage.icon = "roll_attack_miss";
    			ActionAttack.clearCritState(rSource, rTarget);
    			-- KEL Adding Save Overlay
    			if rRoll.actionStuffForOverlay == "true" then
    				TokenManager2.setSaveOverlay(ActorManager.getCTNode(rTarget), -3);
    			end
    			-- END
    		else
    			rMessage.icon = "roll_attack";
    		end
    	else
    to be this:
    Code:
    	if nTotal <= nMissChance and hasSpecialAbility(rSource, "Blind-Fight", true, false, false, true) then -- bmos adding blind-fight
    		if string.match(rMessage.text, "%[BLIND%-FIGHT%]") or
    			string.match(rMessage.text, "%[ATTACK.*%((%w+)%)%]") ~= 'M' or
    			(EffectManager35E.hasEffect(rTarget, "Incorporeal") and not EffectManager35E.hasEffect(rSource, "Incorporeal")) then
    			
    			rMessage.text = rMessage.text .. " [MISS]";
    			removeVar = true;
    			if rTarget then
    				rMessage.icon = "roll_attack_miss";
    				ActionAttack.clearCritState(rSource, rTarget);
    				-- KEL Adding Save Overlay
    				if rRoll.actionStuffForOverlay == "true" then
    					TokenManager2.setSaveOverlay(ActorManager.getCTNode(rTarget), -3);
    				end
    				-- END
    			else
    				rMessage.icon = "roll_attack";
    			end
    		else
    			rMessage.text = rMessage.text .. " [MISS]";
    			removeVar = true;
    			if nMissChance > 0 then
    				local aMissChanceDice = { "d100" };
    				if not UtilityManager.isClientFGU() then
    					table.insert(aMissChanceDice, "d10");
    				end
    				local rMissChanceRoll = { sType = "misschance", sDesc = string.gsub(rMessage.text, " %[MISS%]", "") .. " [BLIND-FIGHT]", aDice = aMissChanceDice, nMod = 0, fullattack = rRoll.fullattack, actionStuffForOverlay = rRoll.actionStuffForOverlay };
    				ActionsManager.roll(rSource, rTarget, rMissChanceRoll);
    				-- KEL compatibility test with mirror image handler
    			else
    				rMessage.icon = "roll_attack";
    			end
    		end -- end bmos adding blind-fight
    	elseif nTotal <= nMissChance then
    		rMessage.text = rMessage.text .. " [MISS]";
    		removeVar = true;
    		if rTarget then
    			rMessage.icon = "roll_attack_miss";
    			ActionAttack.clearCritState(rSource, rTarget);
    			-- KEL Adding Save Overlay
    			if rRoll.actionStuffForOverlay == "true" then
    				TokenManager2.setSaveOverlay(ActorManager.getCTNode(rTarget), -3);
    			end
    			-- END
    		else
    			rMessage.icon = "roll_attack";
    		end
    	else
    Last edited by bmos; December 7th, 2020 at 00:27.

  2. #12
    Quote Originally Posted by bmos View Post
    Ammunition Manager v1.9 now automates blind-fight's re-roll-on-miss function.
    The special circumstance of blink is not included in the automation at this time.

    Kelrugem, perhaps you can bring this into your extension?
    I add my special ability search function:
    Code:
    ---    This function checks NPCs and PCs for special abilities.
    local function hasSpecialAbility(rActor, sSearchString, bFeat, bTrait, bSpecialAbility, bEffect)
        if not rActor or not sSearchString then
            return false
        end
        local nodeActor = rActor.sCreatureNode;
    
        if bEffect and EffectManager35E.hasEffectCondition(rActor, sSearchString) then
            return true
        end
    
        local sSearchString = string.lower(sSearchString);
        local sSearchString = string.gsub(sSearchString, '%-', '%%%-');
        if ActorManager.isPC(nodeActor) then
            if bFeat then
                for _,vNode in pairs(DB.getChildren(nodeActor .. '.featlist')) do
                    local sFeatName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
                    if sFeatName and string.match(sFeatName, sSearchString .. ' %d+', 1) or string.match(sFeatName, sSearchString, 1) then
                        return true
                    end
                end
            end
            if bTrait then
                for _,vNode in pairs(DB.getChildren(nodeActor .. '.traitlist')) do
                    local sTraitName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
                    if sTraitName and string.match(sTraitName, sSearchString .. ' %d+', 1) or string.match(sTraitName, sSearchString, 1) then
                        return true
                    end
                end
            end
            if bSpecialAbility then
                for _,vNode in pairs(DB.getChildren(nodeActor .. '.specialabilitylist')) do
                    local sSpecialAbilityName = StringManager.trim(DB.getValue(vNode, 'name', ''):lower());
                    if sSpecialAbilityName and string.match(sSpecialAbilityName, sSearchString .. ' %d+', 1) or string.match(sSpecialAbilityName, sSearchString, 1) then
                        return true
                    end
                end
            end
        else
            local sSpecialQualities = string.lower(DB.getValue(nodeActor .. '.specialqualities', ''));
            local sSpecAtks = string.lower(DB.getValue(nodeActor .. '.specialattacks', ''));
            local sFeats = string.lower(DB.getValue(nodeActor .. '.feats', ''));
    
            if bFeat and string.find(sFeats, sSearchString) then
                return true
            elseif bSpecialAbility and (string.find(sSpecAtks, sSearchString) or string.find(sSpecialQualities, sSearchString)) then
                return true
            end
        end
        
        return false
    end
    and modify this part of onMissChance:
    Code:
        if nTotal <= nMissChance then
            rMessage.text = rMessage.text .. " [MISS]";
            removeVar = true;
            if rTarget then
                rMessage.icon = "roll_attack_miss";
                ActionAttack.clearCritState(rSource, rTarget);
                -- KEL Adding Save Overlay
                if rRoll.actionStuffForOverlay == "true" then
                    TokenManager2.setSaveOverlay(ActorManager.getCTNode(rTarget), -3);
                end
                -- END
            else
                rMessage.icon = "roll_attack";
            end
        else
    to be this:
    Code:
        if nTotal <= nMissChance and hasSpecialAbility(rSource, "Blind-Fight", true, false, false, true) then -- bmos adding blind-fight
            if string.match(rMessage.text, "%[BLIND%-FIGHT%]") then
                rMessage.text = rMessage.text .. " [MISS]";
                removeVar = true;
                if rTarget then
                    rMessage.icon = "roll_attack_miss";
                    ActionAttack.clearCritState(rSource, rTarget);
                    -- KEL Adding Save Overlay
                    if rRoll.actionStuffForOverlay == "true" then
                        TokenManager2.setSaveOverlay(ActorManager.getCTNode(rTarget), -3);
                    end
                    -- END
                else
                    rMessage.icon = "roll_attack";
                end
            else
                rMessage.text = rMessage.text .. " [MISS]";
                removeVar = true;
                if nMissChance > 0 then
                    local aMissChanceDice = { "d100" };
                    if not UtilityManager.isClientFGU() then
                        table.insert(aMissChanceDice, "d10");
                    end
                    local rMissChanceRoll = { sType = "misschance", sDesc = string.gsub(rMessage.text, " %[MISS%]", "") .. " [BLIND-FIGHT]", aDice = aMissChanceDice, nMod = 0, fullattack = rRoll.fullattack, actionStuffForOverlay = rRoll.actionStuffForOverlay };
                    ActionsManager.roll(rSource, rTarget, rMissChanceRoll);
                    -- KEL compatibility test with mirror image handler
                else
                    rMessage.icon = "roll_attack";
                end
            end -- end bmos adding blind-fight
        elseif nTotal <= nMissChance then
            rMessage.text = rMessage.text .. " [MISS]";
            removeVar = true;
            if rTarget then
                rMessage.icon = "roll_attack_miss";
                ActionAttack.clearCritState(rSource, rTarget);
                -- KEL Adding Save Overlay
                if rRoll.actionStuffForOverlay == "true" then
                    TokenManager2.setSaveOverlay(ActorManager.getCTNode(rTarget), -3);
                end
                -- END
            else
                rMessage.icon = "roll_attack";
            end
        else
    Yes, I can try to add that when my stuff settled down (I try to finish my thesis this month actually, hence, a looot to do right now ). Funnily, some parts of it are also already in my prototype stuff, I started with that, too, a bit So, thanks

  3. #13
    Careful as miss chance coming from incorporeality is not checked twice, and anyways only from melee (i can't read "melee" in the code, but it's also true I mostly can't understand much from in there XD)

  4. #14
    Quote Originally Posted by Asgurgolas View Post
    Careful as miss chance coming from incorporeality is not checked twice, and anyways only from melee (i can't read "melee" in the code, but it's also true I mostly can't understand much from in there XD)
    Thanks. Just reuploaded to address that (and have changed the post detailing how it works).
    Is there a way to tag PC attacks as incorporeal?
    Last edited by bmos; December 6th, 2020 at 18:59.

  5. #15
    not that I know... I know Kelrugem made a "ghost touch" effect. For mage armor, I just "AC: 4 armor; IFT: TYPE (incorporeal); AC: 4 melee". The bad part is that the +4 applies against spells too.

    I just tried a bunch of things, but I haven't yet been able to apply "incorporeal" to PC attacks

  6. #16
    When you are incorporeal (having that effect), then your attacks are treated as incorporeal rather change IFT: TYPE(incorporeal) to IFT: incorporeal (I think the former doesn't even work)

    But just write AC: 4 armor actually (when it is not an incorporeal touch attack), incorporeal is not that automated in 3.5e in FG It just adds the miss chance but it does not ignore armor, natural armor and shield bonus types, that you still need to do manually So, until that is automated, armor bonus types are still applied and so you do not need such a complicated effect (because most incorporeal creatures do touch attacks such that one does not need that automation of AC stuff; so, accounting for touch attacks while not for spells is difficult with an effect. So, you can keep your effect, AC: 4 armor; IFT: incorporeal; AC: 4 melee, to account for touch attacks but you still need to do a lot of stuff manually for incorporeality)

    I had once a "ghost" type of AC in my extension, I can add it back, seemingly it is needed for such situations

    EDIT: Additionally, you could declare your incorporeal attack as touch, but may lead to a problem when the defender is also incorporeal I would need to look more closely into that, I never had anything incorporeal going on at the moment
    Last edited by Kelrugem; December 6th, 2020 at 21:03.

  7. #17
    IFT: TYPE checks for anything on the "type" string, so for a devil which has "Outsider (evil, fire, baatezu)" would trigger either or all the "IFT: TYPE (outsider)", "IFT: TYPE (evil)", "IFT: TYPE (fire)", and "IFT: TYPE (baatezu)". Also remember that in 3.5 an "evil outsider" is different than "outsider with an evil alignment"

    A ghost touch armor would be useful, but kinda nasty to differentiate when you have to consider armor and shield the same way as natural armor is: FG doesn't differentiate "natural armor" from "enhancement bonus to natural armor": a character with a +1 amulet of natural armor AND having a +3 bonus to its own base natural armor forces you to script the effect as "+4 armor, natural" for it to work (adding the item bonus AND the already present +3 base)

  8. #18
    Quote Originally Posted by Asgurgolas View Post
    IFT: TYPE checks for anything on the "type" string, so for a devil which has "Outsider (evil, fire, baatezu)" would trigger either or all the "IFT: TYPE (outsider)", "IFT: TYPE (evil)", "IFT: TYPE (fire)", and "IFT: TYPE (baatezu)". Also remember that in 3.5 an "evil outsider" is different than "outsider with an evil alignment"

    A ghost touch armor would be useful, but kinda nasty to differentiate when you have to consider armor and shield the same way as natural armor is: FG doesn't differentiate "natural armor" from "enhancement bonus to natural armor": a character with a +1 amulet of natural armor AND having a +3 bonus to its own base natural armor forces you to script the effect as "+4 armor, natural" for it to work (adding the item bonus AND the already present +3 base)
    Yeah, I just looked, indeed incorporeal is also a type which can be checked Though most creatures with that type also have that condition, so, not a difference most time

    About AC: Yes, one may need multiple types of armor maybe as for damage types, or simply to ghost types (the natural natural armor type is normally never changed (besides increasing HD), so, one can just treat it as misc. bonus most of the time at least I do not know of any spell or circumstance in combat where the actual naturl AC is important )

    EDIT: But maybe shift the discussion, if still needed, somewhere else; poor Ammunition Manager cluttered with that

  9. #19
    Quote Originally Posted by Asgurgolas View Post
    not that I know... I know Kelrugem made a "ghost touch" effect. For mage armor, I just "AC: 4 armor; IFT: TYPE (incorporeal); AC: 4 melee". The bad part is that the +4 applies against spells too.
    Add NIFTAG: spell before the IFT section, perhaps?
    Quote Originally Posted by Kelrugem View Post
    When you are incorporeal (having that effect), then your attacks are treated as incorporeal rather change IFT: TYPE(incorporeal) to IFT: incorporeal (I think the former doesn't even work)
    Yeah, there's definitely something in code for [INCORPOREAL] attacks but it might only be for NPCs. I have updated the code in that comment so that if both attacker and defender have incorporeal condition than it rolls again for blind fight as this seems to be the most reasonable ruling.
    Last edited by bmos; December 7th, 2020 at 11:55.

  10. #20
    cool, thanks a lot

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
  •  
FG Spreadshirt Swag

Log in

Log in