PDA

View Full Version : auto XP for Gold



hawkwind
February 11th, 2022, 14:29
a coding challenge, to come up with an extension or rule set change to automatically award Xp when a player gets given gold in a parcel

celestian
February 11th, 2022, 15:22
a coding challenge, to come up with an extension or rule set change to automatically award Xp when a player gets given gold in a parcel

Look at the 2E code. If you drag/drop a parcel with coins in it into the party inventory it will automatically add XP values for them.

bayne7400
February 11th, 2022, 16:34
Ok you have to drop it into the XP tab I just tested it. It did not work on inventory drop but I had no idea this was coded in 2e. I've been manually assigning gold XP in Night Below.

bayne7400
February 11th, 2022, 16:41
a coding challenge, to come up with an extension or rule set change to automatically award Xp when a player gets given gold in a parcel

You can use his code verbatim at the moment. It looks like parcels are not changing so should be good to go after next core update as well.

celestian
February 11th, 2022, 16:58
Ok you have to drop it into the XP tab I just tested it. It did not work on inventory drop but I had no idea this was coded in 2e. I've been manually assigning gold XP in Night Below.

Yes, you are correct. I meant XP window ;( I did this for the 1e people that use gold/xp rewards.

hawkwind
February 11th, 2022, 22:53
like wise i didnt know you could do it in the 2e ruleset

Furio74
April 28th, 2022, 15:53
This is very much wanted! Is anyone taking up the coding challenge?

bayne7400
April 28th, 2022, 20:02
Ok guys after speaking with Celestian I took his code for 2e and modified it. basically drop your parcel onto the encounters section of your XP tab on the party sheet. It will return the "< name of the parcel > [COINS]" with the cumulative coin XP for all coins.

Furio74
April 29th, 2022, 20:34
Ok guys after speaking with Celestian I took his code for 2e and modified it. basically drop your parcel onto the encounters section of your XP tab on the party sheet. It will return the "< name of the parcel > [COINS]" with the cumulative coin XP for all coins.

When I do this I get an error message in the log:

bayne7400
April 29th, 2022, 20:45
Edit. try deleting the pak file and updating again. I checked the version on the server it it was correct.

This is line 120 to 124

for _,aRate in ipairs(OSE_Tables.expForCoinRate) do
local sCoin = aRate[1];
local nReward = aRate[2];
if sCurrency:lower() == sCoin:lower() then
nEXP = math.floor(nCurrency * nReward + .5) + nEXP;

--break;
end
end

Furio74
April 29th, 2022, 20:52
I deleted the pak file called OSE2 then restarted FG, still don't see it.

bayne7400
April 29th, 2022, 20:54
Did you hit the update button? Please hop in FG discord so I can help you TS

Furio74
April 29th, 2022, 21:02
Did you hit the update button? Please hop in FG discord so I can help you TS

Yes, ran "Check for updates" button. What is your Discord name?

bayne7400
April 29th, 2022, 21:03
Bayne#7400

Furio74
April 29th, 2022, 21:19
All working now. Thanks Bayne for the help in Discord, much appreciated.