devolution

Author Topic: question about lua scripting  (Read 3059 times)

0 Members and 1 Guest are viewing this topic.

Offline fires_flair

  • Sr. Member
  • ****
  • Posts: 411
question about lua scripting
« on: November 19, 2010, 12:03:08 AM »
so, when this is implemented will we be able to do things like tell the game to use certain pictures instead of the ones that would be called (like a birth pic when that specific warning comes up, or a certain pic(s) if she's raped or what ever the warning).

also will it still need the trigger file, or not? and on that note, in the current scripting system  (if anyone knows) does the trigger file need to be called trigger, or can it be called something else, or have more then one trigger in it?

thanks in advance

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: question about lua scripting
« Reply #1 on: November 19, 2010, 07:18:00 AM »
so, when this is implemented will we be able to do things like tell the game to use certain pictures instead of the ones that would be called (like a birth pic when that specific warning comes up, or a certain pic(s) if she's raped or what ever the warning).

By and large. It won't have Lua entry points for every conceivable event, but you'll be able to alter a lot of things



also will it still need the trigger file, or not? and on that note, in the current scripting system  (if anyone knows) does the trigger file need to be called trigger, or can it be called something else, or have more then one trigger in it?


Yeah, it should still use the trigger file for a lot of things. Although I was thinking about having some overrides built into girl or item definitions.

Offline LordJerle

  • Full Member
  • ***
  • Posts: 239
Re: question about lua scripting
« Reply #2 on: November 20, 2010, 02:34:52 AM »
Question here as well.
Will you be making it so we can edit scripted events via an outside OLC style editor? (Yet another MUD reference, but hey, I get good ideas from bygone times.)
Also, will the scripts be implemented into a single file or can we save each script unto itself so if we do anything gamebreaking, it can be deleted?

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: question about lua scripting
« Reply #3 on: November 20, 2010, 03:45:35 PM »
Question here as well.
Will you be making it so we can edit scripted events via an outside OLC style editor? (Yet another MUD reference, but hey, I get good ideas from bygone times.)

Yeah, the scripts are going to be text files, so you can edit them with any programming editor. Or notepad, if all else fails :)

Also, will the scripts be implemented into a single file or can we save each script unto itself so if we do anything gamebreaking, it can be deleted?

The idea is to have one file for each girl/item/room/whatever.

Offline LordJerle

  • Full Member
  • ***
  • Posts: 239
Re: question about lua scripting
« Reply #4 on: November 21, 2010, 01:31:45 AM »
Are you putting in protection against looping scripts?  One of the problems we ran into on my MUD was that newbie builders would accidentally create looping mobprogs and it'd create a runaway process until we hardcoded in a kill switch for the loops.  I'm assuming not everybody's familiar with scripting or progs and thus are bound to make mistakes in the learning process :)
Even a forced crash with an error log pinpointing which script was looping would make a huge difference.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: question about lua scripting
« Reply #5 on: November 21, 2010, 03:25:32 AM »
Good idea. Maybe time out after five seconds.

I wonder what the best way is to abort a lua sccript gracefully. Normally I'd just junk the engine, but if I do that here, we'll lose any data set by the other scripts