PDA

View Full Version : Extension Conflict (Looking to hire a coder)



Thanatos0042
March 4th, 2022, 01:44
I've unfortunately encountered a situation where I have 2 mods I'd like to use to keep some aspects of my game simple, because a couple of my players have a very tough time with FG and it's complexity.

I need some help solving the conflict, seems like the problem may just be 1 of the mods, but unfortunately the author isn't around much and can't or won't work with just anyone to debug the mod. I believe part of the problem is it uses depricated variables and then there's a nil value message.

If there's a coder out there who can help out, I can provide screenshots and whatever else is necessary to get the problem resolved. I'd also be willing to buy you a cup of coffee for your time (or some equivilent thereof).

I'd do it myself, but I can't code my way out of a wet paper bag.

PM me if you would, since I'm not interested in naming names or mods in the public forum...and normally I'd be more patient about the time, but I have a game coming up Sunday and I've love to have it working before then.

Thanks.

Tatas
March 4th, 2022, 01:49
You very much should feel free to name the mods. Mod conflicts can be quite common some times. It is not an insult or slight against the developers to make them aware of the conflict.

Thanatos0042
March 4th, 2022, 01:55
They are aware of the issue, its from their threads I was able to figure out where the conflict comes and that the other now only offers support to other mod authors for mod conflict resolution.

...I tend to be over cautious about such things, because while I am difficult offend, it seems that is not how the world works anymore.

Sorry - work interrupted me, so I've come back to finish -

The mod the error is likely in is 5E combat Automation.
The conflict is with Kit N Kboodle and Capital Gains at least.

LordEntrails
March 4th, 2022, 03:49
Make sure both mod authors are aware of the conflict. Ask them to work wit each other to resolve. Usually they will.

Thanatos0042
March 4th, 2022, 05:45
This was already done by someone other than me who is having a similar conflict with some other Mod.
Unfortunately the Combat Automation author said he has no time to troubleshoot conflicts with other mods, but would work directly with the Mod Author his mod was conflicting with or if his mod had a problem with no other mods live.
The other author said life was crazy and it would be weeks before he was around. I did message him and since I didn't get a response, I figured he must be too busy - and that's fair.

So, left with no other reliable alternative, I've posted here. I can't fix it myself, or I would...and I work too many hours and have too many responsibilities to teach myself coding, even if I wasn't already too old and too tired :) . Since I paid for Combat Automation and have no support for it, I don't feel like it's inappropriate to ask for assistance and offer some gratitude.

damned
March 4th, 2022, 07:09
Are you sure you are on the latest versions as there is a deprecated function being called in there. Which extension generates that error?

Thanatos0042
March 4th, 2022, 13:36
Downloaded the last updated version I could get from DM's Guild for Combast Automation (the lsat update to it was done - 2021-03-04 21:04:35)
And the same from the Forge for KnK (updated 12 days ago).

To make sure I went to the extensions folder, deleted them both, went and downloaded new version and verified the install date was 2/28/22 (when I initially did this).

Here's the thread I discovered this - https://www.fantasygrounds.com/forums/showthread.php?65937-5E-Kit-N-Kaboodle/page23 (start at post 226) and where he said it will be a few weeks before normalcy returns - https://www.fantasygrounds.com/forums/showthread.php?65937-5E-Kit-N-Kaboodle&p=640783&viewfull=1#post640783
This is where it was posted under the Spell Automation thread since there is no Combat Automation thread - https://www.fantasygrounds.com/forums/showthread.php?62208-5E-Spell-Automation/page12 (starts @ 115 to 120).

Thanatos0042
March 4th, 2022, 13:37
Double post.

Trenloe
March 4th, 2022, 16:22
I hope you find someone who can look into this for you.

However, the issues your seeing are a fact of life when running extensions - they change base FG code, may require updates as FG code changes and can frequently conflict with other extensions. The issue will be that even if someone helps to make these extensions work together today, there is no guarantee they will continue to work together in the future without updates.

I've produced many extensions for Fantasy Grounds and it's an ongoing task just to keep the extensions compatible with the changing base FG code; let alone having to code around other community devs code to make code I've written work with other extensions. All a developer can do is try to make their extension code have the least impact to the overall FG code structure - but the more functionality the extension has, the less that is possible.

I understand you're frustrated and have paid for these community extensions. But all a community dev is really responsible for is making their extension work in isolation - they can't be expected to look into incompatibilities with extensions developed by other community developers.

Like I said, I hope you find someone who is willing to look into your issue. However, keep in mind that even if there is a fix for the extensions right now, this will only be a band aid and could require fixes in the future.

Thanatos0042
March 4th, 2022, 16:37
Thanks Trenloe, I hope I do too.

I get that there are always going to be code changes and conflicts. I'm no stranger to that. I ran a WoW guild forum for over 20 years and had paid and free mods for it. When a mod stop getting supported, I'd go to the 'job requests' section of the forum and pay someone to fix the mod. It would sometimes break again when there was a major update and I'd have to repeat the process. I would usually end up paying more for those fixes than I did for the original mod, but it was worth it to me since it kept things running smoothly.

And I did try to learn to code, but, it just doesn't stick with me. I've never had a gift for that part of the tech-world, much like how I can't fix my car and have to take it to a mechanic :)

and I am frustrated, but I always get that way when getting stuff running smoothly again becomes a complicated. I fortunately only paid for Combat Automation, KnK is a freebie.

I'd like to think my expectations are realistic. I'm not whining or complaining about the situation or the mod authors, I'm just trying to find some help the only way I know how when something is outside of my skill-set - hope someone wants to make a bit of cash on the side to help me get this conflict resolved...and I'd ask somewhere else, if I knew where to go to post. I don't know enough about the coding to know where I could go or who I could ask outside of these forums for help.

Thanks again.

damned
March 4th, 2022, 21:14
One of those is generating that error. Which one please?

Thanatos0042
March 4th, 2022, 21:17
Combat Automation is the one causing the errors, from what I Gathered from the other threads - That is what the KnK mod author said.

When I noticed the error - I had added abilites to a weapon (via KnK) and when I cliked the button, is when I got the pop-out log error for the deprecated command and nil value for the button.

Holds true with capital gains as well, when I click a button after I've set up a resource, I get the deprecated command as well.

damned
March 5th, 2022, 01:59
Unpack the extension.

Do a find in files and search for:

ActorManager.getType

Post the whole function that this code appears in please.

Thanatos0042
March 5th, 2022, 05:01
Here are the 2 functions reporting issues - Deprecated code and the windowlist (from my prior screenshots). I don't know if they are related or not...so I'll give you instances of both.

ActionManager.getType:

under combat_automation.lua


function notifyNextAttack(Hit, Actor)
if not Actor then
return;
end

local msgOOB = {};
msgOOB.type = OOB_MSGTYPE_NEXTACTION;
msgOOB.Hit = tostring(Hit)

if ActorManager.getType(Actor) == "pc" then
local nodePC = ActorManager.getCreatureNode(Actor);
if nodePC then
if User.isHost() then
Comm.deliverOOBMessage(msgOOB, User.getCurrentIdentity()); -- deliver to GM Server

local sOwner = DB.getOwner(nodePC);
if sOwner ~= "" then
for _,vUser in ipairs(User.getActiveUsers()) do
if vUser == sOwner then
for _,vIdentity in ipairs(User.getActiveIdentities(vUser)) do
if nodePC.getName() == vIdentity then
Comm.deliverOOBMessage(msgOOB, sOwner); -- deliver to owner Client
return;
end
end
end
end
end
else
if DB.isOwner(nodePC) then
handleNofifyNextAttack(msgOOB);
return;
end
end
end
end
end


Windowlist:

under power_item_override.lua:


if Input.isAltPressed() then -- Ritual Override
if upcast_level==-1 then
upcast_level=0
else
upcast_level = -1
end
end

if (upcast_level == -1) and (spell_level ~= 0) then --cast as ritual
upcast_level = 0
use_slot = false
str_chat = clean_name .. " (" .. casting_time .." +10 minutes; Ritual)"
end

if Input.isControlPressed() then -- Use No Slots
use_slot = false
end

if spell_casts > 0 then -- Daily Power
use_slot = false
else -- Spell
-- update group visibility beforehand
windowlist.window.onUsesChanged()
end

if use_slot and (upcast_level ~= 0) and (spell_level ~= 0) and (spell_level > upcast_level) then
str_chat = "Must be cast using at least level " .. spell_level .. " slot! (" .. clean_name .. ")"
ChatManager.Message(str_chat, true, actor)
return
end

if (upcast_level >= 1) and (upcast_level <= 9) and (spell_level ~= 0) and (spell_level < upcast_level) then -- Spell is upcasted
Combat_Automation.Upcast_Dmg_Heal = Combat_Automation.upcast_factor(clean_name, upcast_level - spell_level)
spell_level = upcast_level
upcasted = "upcasted; "
end


and


--Cast Actions
if slot_use ~= "none" then
local s_match = ""
local a_num = 0

a_num = tonumber(OptionsManager.getOption("SA_DEF_ACT"))

if string.find(spell_name, s_arrow) then -- "->"
s_match = string.match(spell_name, s_arrow .. "%d")
if s_match then
a_num = tonumber(string.sub(s_match,3,3))
else
a_num = 9
end
end

if Input.isShiftPressed() then
a_num = 0 -- No Actions
end


a_num = math.min(#actions_list, a_num)

if a_num > 0 then
if a_num > 1 then
Combat_Automation.action_list = subrange(actions_list,2,a_num) -- schedule actions
end

actions_list[1].button.action() -- execude first action

if a_num == #actions_list then
windowlist.window.onUsesChanged() --update view -- if all actions update view
end
end
end

end


under combat_automation.xml:



<!-- campaign/template_power.xml -->
<template name="button_poweraction_mini">
<button_roll>
<bounds>1,1,20,20</bounds>
<script>
function action(draginfo)
PowerManager.performPCPowerAction(draginfo, window.getDatabaseNode());
end

function onButtonPress()
action();

local winlist = window.windowlist.getWindows()
if winlist[#winlist] == window then
window.windowlist.window.parentcontrol.window.wind owlist.window.onUsesChanged()
end
end

function onDragStart(button, x, y, draginfo)
action(draginfo);

local winlist = window.windowlist.getWindows()
if winlist[#winlist] == window then
window.windowlist.window.parentcontrol.window.wind owlist.window.onUsesChanged()
end

return true;
end
</script>
</button_roll>
</template>

damned
March 5th, 2022, 13:33
if ActorManager.getType(Actor) == "pc" then


Try and replace that line with



if ActorManager.isPC(Actor) then

Thanatos0042
March 5th, 2022, 21:34
Thanks for trying to help, I really appreciate it.

when I replace that code, I see an error now when it loads up, plus I don't think other buttons are working now as I get some other errors, still including that windowslist I previously showed.

Screenshots attached...so that tells me it's not a simple fix. Booooo.

damned
March 5th, 2022, 23:26
Please post the same for ActorManager.getActor

Thanatos0042
March 6th, 2022, 05:05
Here we go:

combat_uatomation.lua



function onSave_override(rSource, rTarget, rRoll) -- Save (autofail check)
onSave_old(rSource, rTarget, rRoll) -- original function

local bAutoFail = rRoll.sDesc:match("%[AUTOFAIL%]"); -- Autofail or not
if bAutoFail then
if rRoll.sSource ~= "" then
local Actor = ActorManager.getActor("ct", rRoll.sSource);
notifyNextAttack(true, Actor) -- Handle next action
end
end
end



power_item_override.lua



function usePower(bShowFull)
Combat_Automation.Upcast_Dmg_Heal = 0
local slot_use = ""
local node = getDatabaseNode()
local node_char = node.getChild("...")
local actor = ActorManager.getActor("pc", node_char)
local spell_name = DB.getValue(node, "name", "")
local clean_name = Combat_Automation.clean_name(spell_name)


local s_arrow = string.char(37) .. string.char(45) .. string.char(62) -- "->"
local s_at = string.char(64) -- "@"


local spell_level = DB.getValue(node, "level", 0)
local use_slot = true
local spell_casts = DB.getValue(node, "cast", 0)
local casting_time = DB.getValue(node, "castingtime", "")
local str_chat = ""
local upcasted = ""

if Input.isControlPressed() then
casting_time = ""
end

if casting_time ~= "" then
str_chat = clean_name .. " (" .. casting_time .. ")"
else
str_chat = clean_name
end


local actions_list = self.header.subwindow.actionsmini.getWindows()

local upcast_level = DB.getValue(node_char, "upcast_level", 0)
DB.setValue(node_char, "upcast_level", "number", 0)

if upcast_level == 0 then -- Handle @ Upcasted / Ritual spells
local s_match_at = ""
s_match_at = string.match(string.upper(spell_name), s_at .. "R") -- "@"
if s_match_at then --ritual
upcast_level = -1
use_slot = false
else
s_match_at = string.match(spell_name, s_at .. "%d") -- "@"
if s_match_at then
upcast_level = tonumber(string.sub(s_match_at,2,2)) --@level
if upcast_level==0 then
spell_level = 0
end
end
end
end


just the 2 instances of it.

damned
March 6th, 2022, 05:15
replace


local Actor = ActorManager.getActor("ct", rRoll.sSource);

with


local Actor = ActorManager.resolveActor(rRoll.sSource);


and replace


local actor = ActorManager.getActor("pc", node_char)

with


local actor = ActorManager.resolveActor(node_char)

Thanatos0042
March 6th, 2022, 15:39
Thank you, the deprecated messages are resolved. I appreciate your time and effort.




So now I just need help with the other two issues. Trying to use any button results in a pop-up log that has to be cleared from the screen, so it makes it a problem to use.

Thanatos0042
March 8th, 2022, 13:24
Could I get a Mod or Admin to edit the title so it reflects "Hiring a Coder" in the title in the forum? I edited it, but it only shows inside the thread and I'm still stuck, dead in the water here despite the help damned was so gracious to give me.

thanks.

Trenloe
March 8th, 2022, 13:34
Could I get a Mod or Admin to edit the title so it reflects "Hiring a Coder" in the title in the forum? I edited it, but it only shows inside the thread and I'm still stuck, dead in the water here despite the help damned was so gracious to give me.

thanks.
Done. I also clarified that it's an extension conflict.

Thanatos0042
March 8th, 2022, 13:35
I appreciate that, it never occurred to me. Thank you very much!