I'm trying to put stores places in lua, but just crash the game instead. I've been doing it a lot lately... :-/
I'm not even sure what variables I need to change.
I can alter the feature to be a "store" (feature 74) with ease, but I don't know how to set up an association between the f_info place holder and an actual store.
As a last resort I could simply put in a "fake" store, but I'd rather do it properly.
I was going to sign this, but you probably know who it is trying to hack the game again.
Hmm, I've found that if I set cave(y,x).special to the index of the store, it gives the right appearence, but it still doesn't actually give the store when I move onto it. it just crashes...
I've just found this in bldg.c, which worries me:
which = cave[p_ptr->py][p_ptr->px].special;
building_loc = which;
s_ptr = &town_info[p_ptr->town_num].store[which];
st_ptr = &st_info[which];
'cos it knd of implies that a store needs to have a town number to work.
I suspect I'm going to end up making my own shops in lua...
Ugh, now I can't even make the screen clear properly.
I try term_clear but it doesn't actually clear the whole screen.
What I really need is a screen like one of the options pages or something that I can do what I want with, but util.pkg is not forthcoming...
All the options and stuff use Term_clear(), but when I call it it leaves some of the features on the screen, and I have no idea why...
Ok, I've found out why... I was using HOOK_MOVED rather than HOOK_END_TURN. *looks sheepish*
That's it: I give up until tomorrow. -- TF
Fake stores are now done, so that's that.
ToME Wiki