Jump to content
         

jms

Member
  • Content Count

    37
  • Joined

  • Last Visited

    A long, long time ago...

Community Reputation

0 Clean Slate

About jms

  • Rank
    Hitchhiker

Recent Profile Visitors

69 Profile Views
  1. oh my god, how did i overlook that. thanks daeley, it's working fine now.
  2. beautiful, thankyou. ok, i simplified my script to the following (just to test out basic functionality) and it still doesn't seem to work. is there something i'm missing? --#-package:0bac31a1# -- package signature DataFile = [[Apps\DataFile.dat]] function ProjMain(filename) local exist = io.open(filename) --open file if not(exist) then --if file doesn't exit, create one with this data... io.output(DataFile.dat) io.write("hello!","\n") io.flush() io.output() end end ProjMain(DataFile)
  3. hi daeley, i've already shown stuff in query windows and i found it to be quite basic. the only reason i've taken some of your code/variables is because there's no other example of this sort of stuff for sim city. I am fluent with IO for c, c++, java and i don't find it to be difficult at all. the only problem with programming in lua in this case is that there is no compiler. so when it doesn't work, you have no idea what the problem is! when i tested this mod, i had removed every other mod i had (of course), so i'm pretty sure the name of the variable has nothing to do with why it's not working. anyway, i'm sure i'll work it out today, but i have two more questions... what exactly does a.type = advice_types.ENVIRONMENT do? and also, in your mod you've got a small threading function, i was just wondering why you needed to thread in your script? it doesn't look like there are two things trying to run concurrently at all. help would be greatly appreciated as i'm not actually doing this for myself, i'm doing this as part of a work experiment.
  4. hi guys, i've been slowly teaching myself lua over the last little while but i'm stumped at the moment. my script doesn't seem to work. at the moment, all i want to do is create an external file and put two variables in it. i'm taking small steps at the moment, but i've run into trouble. can anybody see what's wrong with this? --#-package:031EBA61# -- package signature -- Process a file thisCity = 0 ------- DataFile = [[Apps\DataFile.dat]] function Create_DataFile(filename) local exist = io.open(filename) --open file if not(exist) then --if file doesn't exit, create one with this data... io.output(filename) io.write("$beginfile","\n") -- io.write("$nextregion","\n") io.write("$endfile","\n") io.flush() io.output() end end Create_DataFile(DataFile) --functions--- function WriteCrime() io.output(DataFile) io.write(game.trend_value(game.g_police_funding_p, 0) .. "\n") -- these are just here to test which format is the correct way to write io.write(game.g_police_funding_p, 0) .. "\n") -- they are the same variable io.flush() io.output() end function Proj_main() thisCity = 1 if (thisCity == 1) then WriteCrime() end return false end a = create_advice_cityplanning('162ea2b5') a.type = advice_types.ENVIRONMENT a.trigger = "(thisCity == 0)" --triggers at the start of the game until thisCity is given a value a.frequency = 1 a.timeout = 20000 a.title = [[text@4a4e15a1]] a.message = [[text@4a4e15a2]] a.priority = 100 a.mood = advice_moods.GREAT_JOB a.once = 0
  5. so if i wanted the current trendline value, would i place no number on the end? or a zero?
  6. thanks guys, daeley, i found the function you were speaking about. it's trend_value(), and can be used as follows: game.trend_value(game_trends.XXXXXXX, $) where XXXXXXX is the trend value and $ is a number, i'm not quite sure what this number does yet, as i get the same result with values ranging 1-10.
  7. i'm in the middle of creating a lua script which prints out variables to the screen with the use of an advisor script. each time i try to print out variables such as 'game_trends.G_WATER_CONSUMED' it comes up with its initial value of hex2dec(CA14EBD0) instead of the city's actual number. why?!?!? the variables are obviously not being refreshed properly in the game (that's what i'm guessing) it's driving me insane, please somebody help. -jeremy
  8. Originally posted by: Daeley Originally posted by: jms hi guys, sorry for bumping this...i can't seem to be getting this mod to work in my rural town. i was just wondering if you needed rush hour installed?quote> don't know... this mod was created after installing RH, so it *may* work without RH but I'm not counting on it...quote> just installed rush hour, and it works. this is going to help me a lot. you might want to mention to people that this mod doesn't work without RH installed, that'd be helpful. other than that, you're like the reference manual for lua/simcity, thanks a lot!
  9. hi guys, sorry for bumping this... i can't seem to be getting this mod to work in my rural town. i was just wondering if you needed rush hour installed?
  10. is there a list anybody has posted on here with what each id number does? i had a look around but couldn't find anything, i'll keep looking though.
  11. i've been looking through equinox's query upgrade mod and i've just got one question... with the little 'make historical' button, how in the hell does the game know to make a certain building historical after this button is checked?? there is no link to an exemplar as far as i can see. and how does the game know not to show 'abandoned due to commute time' if there are people living at a residential address? i mean, there are links to ltext files and graphic files within the sim city dats, but there is nothing linking to actual functionality! if i just plop a random button down in my query, how will the game know what to do with it?
  12. Autosave mod request

    oh god daeley, thank-you! i am bowing to you as i write this.
  13. Autosave mod request

    daeley, if you can make a popup appear every x minutes, i would love to know how you do it. any advice you could give me would be greatly appreciated.
  14. thanks a lot daeley, just a few more questions... how would i go about copying these variables that i display to an external file such as a .txt one? and also, can i make my UI refresh every second or so, so it displays variables that are constantly changing? or must i manually click on an object to make the UI appear again with a new set of data? thanks so much for your help.
  15. hi daeley, no i don't really have any experience in modding but i plan to within the next few months. i'm looking to add a mod to the game which can extract certain game variables that you cannot usually see while playing the game. it'd help if i could design a query window to display these changing variables or if i can just send these variable values to an external .dat file or whatever hopefully using a batch script inside the lua script. it's a small project i'm working on and would like to construct a model with the data i extract. the variables i'm looking at analysing are basically all the constant changing variables in the game, so in the lua scripts, most of the 'game.####' variables. i'm almost finished my software engineering degree, i'm familiar with most languages and although i haven't used lua before, it seems fairly straight forward. thanks for your time. and thanks qurlix, i'm reading through the regional tracking mod for some tips, but i can't get the thing to run so there's not much point, i'll check out the other mods you've suggested.
×