Author Topic: A few scripting questions...  (Read 4742 times)

0 Members and 1 Guest are viewing this topic.

Offline F-Trill

  • Full Member
  • ***
  • Posts: 108
A few scripting questions...
« on: December 07, 2012, 04:35:50 AM »
Hello to everyone.


There are a few scripting things I'd like to know in order to create some bang-up custom items.  If anyone here can help me or point me in the right direction, I'd be grateful!




First off, I've just started playing this in the last few weeks, and I'm fascinated by it.  The potential for mind blowing excellence is absolutely there.  Of course, the game has its rough spots, but on the whole, it is a pretty fun game.  With that said, I'd like to create a few items with some customized scripts.


The first thing I'd like to do is create a script that could resurrect a girl.  My thought is something along the lines of a resurrection stone or some such for story purposes; something that can only be found in the catacombs or is extremely rare in stores for balance; and something that is extremely pricey, also for balance.


The problem is, I do not believe there is a script existing that allows for resurrection, meaning that I would first have to create it.






The next item are two intentionally off-balance items.  One is a dress that would maximize all the physical stats, but lower the skills to nill, while the other does just the opposite.  If this was all the item should do, then it would be easy to make with the WM Editor.  However, I'd like to try and create a script I could reference in the item that would allow the stats and skills to slowly balance back out, with a very basic increase all the way around; the idea being that this would simulate the girl getting used to it and adjusting.


I'd like to know if this is possible with scripting to begin with; and if it is, what, if anything, I would need to reference/modify, etc.






Finally, perhaps the most ambitious of my goals is to create a script that would allow an occasional battle within the catacombs.  I recognize that, right now, the game is not about battle but management; however, I would certainly like to see a battle sequence take place with a choice or two that would affect the outcome.  After examining the script, I think it's possible, but I'm not sure how to write it in such a way as to be properly utilized.






Thanks for helping the newbie out, guys!

Offline crazy

  • Hero Member
  • *****
  • Posts: 733
Re: A few scripting questions...
« Reply #1 on: December 07, 2012, 06:03:51 AM »
Some interesting ideals..  But I'm not sure any of this is do able with scripting right now.  I'm 99% sure you can't bring a girl back to life I might be wrong.  Item ideal is interesting but I don't think scripts can refrence an item.  Battle one might be do able though I seem to remember a script that had a go to the catacombs with one of your girls in it.  Biggest problem with that one I see is the PC does have stats but I'm not sure if they actually effect anything so I mean you might could script it as to you make choices that help the girl but I'm not sure what else it could do.

Not the most helpful cause most of this is off memory so take it for that you might can find ways to do this.

Offline F-Trill

  • Full Member
  • ***
  • Posts: 108
Re: A few scripting questions...
« Reply #2 on: December 07, 2012, 06:12:27 AM »
Appreciate it, Crazy.


I was pretty certain the resurrection script was possible, due to an example found within the game script itself.  I may be wrong, however.  I also thought it would be possible to point an item at a script in a similar manner as it affect stats, skills, etc.


The battle idea was one of my favorites.  lol  It would add a certain level to the game that seems to be missing, imho.

Offline PinkPervert

  • Jr. Member
  • **
  • Posts: 83
Re: A few scripting questions...
« Reply #3 on: December 07, 2012, 10:19:46 PM »
the way the game currently is, I don't think you can do  a resurrection, because the game erases any dead girls from memory. But... if we really wanted, we could create a variable which stores dead girls, so they could be brought back.... The problem with this, is it will use up memory for girls who are.. dead. So if you don't bring one back to life, they are still there taking up that memory.

Still, there may be a way to go about it, perhaps a saving a girls basic stats to a file on the disk which is used as a dead file or something. Dunno.

Offline F-Trill

  • Full Member
  • ***
  • Posts: 108
Re: A few scripting questions...
« Reply #4 on: December 07, 2012, 11:57:50 PM »
That's a thought.


My basic approach was that this ring would allow that girl to be resurrected, but only because she wore it.  In other words, the game would not have to save every dead girl, just whichever one was marked with the ring.  Since it would be a rare/catacombs only find, there would be no concern regarding a major increase in file size/allocation.

Offline trex

  • Donator
  • *****
  • Posts: 143
Re: A few scripting questions...
« Reply #5 on: December 08, 2012, 01:34:01 AM »
Could it be possible to allow the ring never let a girl get below 1hp?

And to make it permanent, make it kill her if she/you took it off (justification being she is actually dead, the ring is the only thing keeping her alive)?

She doesn't actually become dead as the game reads it, but for all player-related purposes she is. Of course this is redundant if you wanted to script in/add new effects for this new 'undead' girl status.

She can always be boosted up to full health though with the 1hp minimum, and being at 1hp opens her up for a lot of bad consequences, so maybe it's useful for what your aiming for, maybe not.

Perhaps if a new trait 'Undead/Cursed' (?) was added by the ring, you could add in effects that way easily?


I didn't notice you wanted to make it a rare find, so yeah, all of this is actually useless if the girl dies BEFORE you put the ring on, so not really what you're aiming for. Still maybe useful if you could preempt their death and put it on beforehand though.

Good luck with your plans, I look forward to seeing it.
« Last Edit: December 08, 2012, 01:39:05 AM by trex »

Offline F-Trill

  • Full Member
  • ***
  • Posts: 108
Re: A few scripting questions...
« Reply #6 on: December 08, 2012, 02:35:23 AM »
Thanks, Trex, that actually would be a really good way of substituting my idea!!


Until such a time as it is possible to create a new attribute that such an item could use, your idea actually works much closer to what I've been envisioning than what I was trying to describe.  Appreciate that!






Guess I'll still play around with a way to make a "re-balancing" script.  If nothing else, that kind of script could be worked into the game as a whole, even if I couldn't use it directly for an item.  I think if I link the addition and subtraction of skills/stats to the passage of game time, it would work fairly well.  Granted, that would be a pretty big script in and of itself, though...  ::)   Oh, the things we do for games we love!

Offline PinkPervert

  • Jr. Member
  • **
  • Posts: 83
Re: A few scripting questions...
« Reply #7 on: December 09, 2012, 02:59:29 AM »
At the moment I know very little about scripting, or how items work.. that is more Crazy's area. But I can say that just about anything is possible, the real question is how difficult will it be? :)

Offline F-Trill

  • Full Member
  • ***
  • Posts: 108
Re: A few scripting questions...
« Reply #8 on: December 09, 2012, 04:34:07 AM »
Well, it seems that every game has a slightly different twist on script- I did a little minor tweaking with Elder Scrolls: Oblivion a few years ago, and of course there was Neverwinter Nights back in the day.


The script for this game is at once far less complicated, and moreso.  A better way of putting it would be to say that it is complicated in its relative simplicity.  I find myself reading a lot more into certain terms than I should be.




PP, if scripting is Crazy's field, what is it you do, if you don't mind my asking?

Offline PinkPervert

  • Jr. Member
  • **
  • Posts: 83
Re: A few scripting questions...
« Reply #9 on: December 09, 2012, 12:42:48 PM »
I guess my specialty is bug hunting and fixing, we both work pretty equally on the mod, there are just certain areas of the code that each one of us knows better. Crazy knows more about the scripting engine, and image handling than I do, where I suspect that I know more about how the brothel's work in the background. We both work on new features.
--PP

Offline F-Trill

  • Full Member
  • ***
  • Posts: 108
Re: A few scripting questions...
« Reply #10 on: December 09, 2012, 03:42:16 PM »
Awesome.  All right.  I was just curious how such a joint mod partnership worked.




As a side note, does anyone check the "How To Add Girls" thread?  I had post a question a few days ago, but haven't seen anything since then... And the last activity in it was last year sometime.