Shops (now with source)
Re: Shops (now with source)
Still cant get shop framework to work with the sky framework.
If you want to send me the file you can upload it to the nexus I guess.
Thx,
LordGarth
If you want to send me the file you can upload it to the nexus I guess.
Thx,
LordGarth
Dungeon Master and DOOM will live forever.
Re: Shops (now with source)
amazing things!
good job!
good job!
Re: Shops (now with source)
Hmm. I am not using the sky framework though so not sure if it would actually help out much :/ I can still upload it if you like however.LordGarth wrote:Still cant get shop framework to work with the sky framework.
If you want to send me the file you can upload it to the nexus I guess.
Thx,
LordGarth
Re: Shops (now with source)
There are no shops yet in my demo game because a duplicate rain particle hit a black phantasm and he got mad and ate the shop keeper.
Coding joke.
function openshop
false
else
false
no return
end.
hahahahahahahhahahahahah
LordGarth
P.S.
I hope the flooded dungeon and mahric's npc code works with skyscript framework.
Coding joke.
function openshop
false
else
false
no return
end.
hahahahahahahhahahahahah
LordGarth
P.S.
I hope the flooded dungeon and mahric's npc code works with skyscript framework.
Dungeon Master and DOOM will live forever.
Re: Shops (now with source)
there seems to a be bug in the released code, I'm not sure where but downloading the release code and implementing it in a dungeon - it doesn't seem to initialise properly and throws errors when trying to create a letter of credit, also just straight up drops out to editor when you try to open the shop
However if you take the demo dungeon and copy the files from there instead it works...and is wonderful!
Now all I need to do is to get it to play nice with my other scripts /grab_coffee
So I've got it to work with logfw woot!
leave the clone party code out of your init file instead create a script entity somewhere and place in the following code:
works like a charm
The downside.... the guiondraw portion doesn't work if you have grimwidgets enabled so the whole thing breaks, bit of a bummer
However if you take the demo dungeon and copy the files from there instead it works...and is wonderful!
Now all I need to do is to get it to play nice with my other scripts /grab_coffee
So I've got it to work with logfw woot!
leave the clone party code out of your init file instead create a script entity somewhere and place in the following code:
Code: Select all
function autoexec()
fw.addHooks('party', 'shop_init', {
onDrawGui = function(g)
return gui.onDrawGui(g)
end,
onMove = function(self)
if (gui.globalVars["shopOn"]) then
return false
else
return true
end
end,
})
fw.debugPrint("shop is activated")
end
The downside.... the guiondraw portion doesn't work if you have grimwidgets enabled so the whole thing breaks, bit of a bummer
Re: Shops (now with source)
and fixed the issue with grimwidgets
go into your grimwidgets folder and open the file grimwidgets.lua
in the clone party section change
to
then save
for the autoexec earlier you don't need the onDrawGui bit so change it to
go into your grimwidgets folder and open the file grimwidgets.lua
in the clone party section change
Code: Select all
onDrawGui = function(g)
gw._drawGUI(g)
end,
Code: Select all
onDrawGui = function(g)
gw._drawGUI(g)
return gui.onDrawGui(g)
end,
for the autoexec earlier you don't need the onDrawGui bit so change it to
Code: Select all
function autoexec()
fw.addHooks('party', 'shop_init', {
onMove = function(self)
if (gui.globalVars["shopOn"]) then
return false
else
return true
end
end,
})
fw.debugPrint("shop is activated")
end
Re: Shops (now with source)
I think there's a bug in the script, if you compile the test dungeon and run it then try to save you will crash to desktop with a serialisation error.
troubleshooting comment out the lines in the script entity thus:
no crash on save
but if you try to open the shop then you get another crash to desktop with no errors but the error log reflects '#gui:328: attempt to index field 'letterCredit' (a nil value) stack traceback: #gui:328: in function 'getMoney''
likely due to the global variable calling an item
troubleshooting comment out the lines in the script entity thus:
Code: Select all
function initLetter()
--gui.createLetter(1,15,17)
--gui.changeMoney(2000) -- initial amount of money
end
but if you try to open the shop then you get another crash to desktop with no errors but the error log reflects '#gui:328: attempt to index field 'letterCredit' (a nil value) stack traceback: #gui:328: in function 'getMoney''
likely due to the global variable calling an item
Re: Shops (now with source)
Yes, that's it; it looks for the 'letter of credit' and cannot find it... If I have time, I'll try to correct the bug (I should be able to do that in a couple of days)remma wrote:I think there's a bug in the script, if you compile the test dungeon and run it then try to save you will crash to desktop with a serialisation error.
troubleshooting comment out the lines in the script entity thus:no crash on saveCode: Select all
function initLetter() --gui.createLetter(1,15,17) --gui.changeMoney(2000) -- initial amount of money end
but if you try to open the shop then you get another crash to desktop with no errors but the error log reflects '#gui:328: attempt to index field 'letterCredit' (a nil value) stack traceback: #gui:328: in function 'getMoney''
likely due to the global variable calling an item
alois
Re: Shops (now with source)
you sir, are a legend!