Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   Dungeon Craft - RPG Game Maker (http://www.ironworksforum.com/forum/forumdisplay.php?f=20)
-   -   Superpowers (http://www.ironworksforum.com/forum/showthread.php?t=99474)

Funky Dynamite 07-30-2008 05:46 AM

Superpowers
 
You guys probably know this, but....
While I was trying to this fiasco I call a design I got a pretty good understanding of normal items (weapons, armor, etc.), particularly weapons. I made several "powers" from weapons, before I used spells to mimic them.
For instance, I made a "Energy Blast" weapon (which was a sling, yes, I know strength modifies the damage but I couldn't find any other weapon that could infinite ammo), made it 2 handed, encumbrance of 0, and dropped in an animation of a fireball. Then I made it undroppable, untradable, etc., this way I could ready it and unready when I so chose. This way I could switch to another "power" or actual weapon in battle.
For example, let's assume you made Cyclops. You could have him shoot at enemies with his ruby red eye beams when they were far away and switch to his "punch" when they closed in.
With characters with natural Super Strength, as some of you may know, I discovered a way of -permanently- altering stats with items. (Only problem with that I don't know how to make a item that returns the stat to the original value once the item is unreadied, such as a Girdle of Giant Strength. Which kinda sucks, but....)
The way I do that is this:
Make a readyable item, I usually call the item "Stat Boost" or something like that.
For example, an item that modifies the character's Strength to 23 would have this script:

$RETURN $SET_CHAR_STR($IndexOf($Target()),23);

And it works for any stat as well. I have a crown that modifies Charisma on my Paladin.

I know this has done and addressed a hundred times before, but I just thought I'd bring my way to you guys.

Funky Dynamite 07-30-2008 05:58 AM

Re: Superpowers
 
1 Attachment(s)
And here's a screenshot of my handiwork. And no, I did not edit the picture itself. :)

manikus 07-30-2008 11:01 AM

Re: Superpowers
 
Unfortunately, your screenshot shows off one of DC's bugs - don't worry, you didn't do anything wrong and it won't effect gameplay - it's just that the strength should be '25' and not '25 97'.

To make an item that returns the stat back to it's original state takes a few more lines of script. You would need:
upon activation(ready)-
GET stat
Store stat as ASL
SET stat

upon de-activation (unready)
SET stat to ASL


One thing that Nol Drek did for his SHUA worldhack (Super Hero Unlimited Adventures), was to make all of the 'powers' cursed items so that they couldn't be swapped around between characters. That wouldn't apply so much to items that give powers, but I thought I'd mention it. :)

Funky Dynamite 07-30-2008 09:37 PM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211171)
Unfortunately, your screenshot shows off one of DC's bugs - don't worry, you didn't do anything wrong and it won't effect gameplay - it's just that the strength should be '25' and not '25 97'.

To make an item that returns the stat back to it's original state takes a few more lines of script. You would need:
upon activation(ready)-
GET stat
Store stat as ASL
SET stat

upon de-activation (unready)
SET stat to ASL


One thing that Nol Drek did for his SHUA worldhack (Super Hero Unlimited Adventures), was to make all of the 'powers' cursed items so that they couldn't be swapped around between characters. That wouldn't apply so much to items that give powers, but I thought I'd mention it. :)

I know. I've been playing with the character like that for at least a couple months now and I haven't had any program problems. I did it on purpose. Well, not the /97 part, but like I said Yes, I know about the 25 max Strength but it was my first attempt at the process and I couldn't figure out how to change perchantile strength.
Tell me more about this script. Do you actually type in literally "get stat, store stat to ASL, etc.?" Or is it more complicated like the code I use? Please, I'm all ears! :) That's one of the things I desire most out of DC.
I understand. But you can't unready cursed items, correct? To avoid "power swapping" what I did was set up a debug area on my first level. (Fact, that's the first thing I did when I made the design.) There I could make the character, give them the powers and special equipment and play with the "stat boosts." The only problem with it is it's not very efficient for actual character creation. But, eh, it's nowhere a perfect process, I'm still perfecting it. Why I didn't make the "powers" cursed is so I can switch between offensive powers freely.

manikus 07-31-2008 10:56 AM

Re: Superpowers
 
I started working on the scripting last night for this kind of item. I am 95% sure that I have it right, but it doesn't work. So, either I have done something wrong, or GPDL is not working for certain aspects. Since, as you might have seen in other posts, Tarlanon has pointed out that GPDL is indeed broken for some things, it might not be my script. Either way, I wasn't able to arrive at something that would help.

SilentThief 07-31-2008 06:18 PM

Re: Superpowers
 
I was having issues with editing effects from items and spells, and thats why I stopped working with it. I can do some tricks (for peanuts or shiny coins :D), but until GPDL is corrected, its functionality is limited to simple tricks.

ST

manikus 07-31-2008 06:42 PM

Re: Superpowers
 
I asked for help on this over at the Yahoo list and PAul responded. I hope he can help, other than telling me that I'm doing it wrong (though that is a step in the right direction).

It seems like we can't actually do scripts for items (bear me out), it seems that we can only attach special abilities which have been scripted differently, so that if we change the "Shillelagh"special ability script to use for an item, it is changed for every other instance of "Shillelagh" in the game.
Spells, we can definitely script.

Until Tarlanon tells us how broken GPDL is, I'm going to assume that it's not broken very much - only the things listed in the various threads around the forum - and that majority of the problem with GPDL/scripts/Logic Block, is user ignorance/inexperience. :) There is woefully little documentation for scripting (and GPDL functions), so until someone comes along who gets it ('cause I seem to be missing something), it seems we'll be able to use about 20% of what DC has to offer.

manikus 08-01-2008 12:54 AM

Re: Superpowers
 
Okay, I've learning about ASLs and GPDL scripting from the master. :D

We don't need to start off our statements with
Code:

$RETURN
I had worked out a way which was fine-tuned with Paul's help (Paul wrote the GPDL engine) to work. But, he has just pointed out to me that there is a better way to do it, and now I have to figure that out. :)

As soon as I do, I'll share it here.

manikus 08-01-2008 01:41 AM

Re: Superpowers
 
Okay, I've got it now. :D

It is a bit more complicated than what we've been doing. :)

Here is the Activation Script:
Code:

$SET_CHAR_ASL($TargetIndex(),"strength25",25-#$GET_CHAR_STR($TargetIndex()));
$SET_CHAR_STR($TargetIndex(),25);

And the Deactivation Script:
Code:

$SET_CHAR_STR($TargetIndex(),$GET_CHAR_STR($TargetIndex())-#$GET_CHAR_ASL($TargetIndex(),"strength25"));

SilentThief 08-01-2008 10:41 AM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211344)
Okay, I've got it now. :D

It is a bit more complicated than what we've been doing. :)

Here is the Activation Script:
Code:

$SET_CHAR_ASL($TargetIndex(),"strength25",25-#$GET_CHAR_STR($TargetIndex()));
$SET_CHAR_STR($TargetIndex(),25);

And the Deactivation Script:
Code:

$SET_CHAR_STR($TargetIndex(),$GET_CHAR_STR($TargetIndex())-#$GET_CHAR_ASL($TargetIndex(),"strength25"));

Does this work? One of the problems I had was I couldn't figure out how to use the ASLs in the GPDL script editor. I wrote up ASL scripts that the editor said were proper syntax, but they still did not work. You can define/use them in logic block, but I couldn't get them to work otherwise.

ST

manikus 08-01-2008 06:17 PM

Re: Superpowers
 
This worked fine in my tests, except that I was using a hat (Thinking Cap) that raised intelligence to 21.

Check out Paul's responses on the Yahoo list...

Funky Dynamite 08-01-2008 08:19 PM

Re: Superpowers
 
Quote:

Originally Posted by SilentThief (Post 1211310)
I was having issues with editing effects from items and spells, and thats why I stopped working with it. I can do some tricks (for peanuts or shiny coins :D), but until GPDL is corrected, its functionality is limited to simple tricks.

ST

So have I.

manikus 08-01-2008 08:24 PM

Re: Superpowers
 
As I stated above, I don't think that the GPDL is that broken. :)

I think that we just don't know how to do a lot correctly. :D

By the by- you can use $MyIndex instead of $TargetIndex in the above code. Paul pointed this out as the better way to do it.

Oh, and by the way, not only has Paul spoken up, but so has Richard (CocoaSpud), and while they're not committing to anything, they are both taking a look at the code. :D

Funky Dynamite 08-01-2008 08:58 PM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211344)
Okay, I've got it now. :D

It is a bit more complicated than what we've been doing. :)

Here is the Activation Script:
Code:

$SET_CHAR_ASL($TargetIndex(),"strength25",25-#$GET_CHAR_STR($TargetIndex()));
$SET_CHAR_STR($TargetIndex(),25);

And the Deactivation Script:
Code:

$SET_CHAR_STR($TargetIndex(),$GET_CHAR_STR($TargetIndex())-#$GET_CHAR_ASL($TargetIndex(),"strength25"));

Cool!
I'll try it tonight....

Funky Dynamite 08-02-2008 07:45 AM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211344)
Okay, I've got it now. :D

It is a bit more complicated than what we've been doing. :)

Here is the Activation Script:
Code:

$SET_CHAR_ASL($TargetIndex(),"strength25",25-#$GET_CHAR_STR($TargetIndex()));
$SET_CHAR_STR($TargetIndex(),25);

And the Deactivation Script:
Code:

$SET_CHAR_STR($TargetIndex(),$GET_CHAR_STR($TargetIndex())-#$GET_CHAR_ASL($TargetIndex(),"strength25"));

Okay, I tested this, works just beautifilly, thank you. Even works with different numbers too.
But what about other stats, like Charisma? I tried this script with the appropriate changes, and it seems not to work. Is it just me?

manikus 08-02-2008 09:29 AM

Re: Superpowers
 
It should work with any attribute. The actual item that I used to test this out, and that Paul helped me with was for Intelligence. When I was testing $MyIndex (instead of $TargetIndex) I did it for Dexterity. :)

For Charisma it should read:
Code:

$SET_CHAR_ASL($MyIndex(),"Char25",25-#$GET_CHAR_CHA($MyIndex()));
$SET_CHAR_CHA($MyIndex(),25);

And
Code:

$SET_CHAR_CHA($MyIndex(),$GET_CHAR_CHA($MyIndex())-#$GET_CHAR_ASL($MyIndex(),"Char25"));
(For the Activation and Deactivation scripts respectively.)

Funky Dynamite 08-03-2008 10:29 AM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211441)
It should work with any attribute. The actual item that I used to test this out, and that Paul helped me with was for Intelligence. When I was testing $MyIndex (instead of $TargetIndex) I did it for Dexterity. :)

For Charisma it should read:
Code:

$SET_CHAR_ASL($MyIndex(),"Char25",25-#$GET_CHAR_CHA($MyIndex()));
$SET_CHAR_CHA($MyIndex(),25);

And
Code:

$SET_CHAR_CHA($MyIndex(),$GET_CHAR_CHA($MyIndex())-#$GET_CHAR_ASL($MyIndex(),"Char25"));
(For the Activation and Deactivation scripts respectively.)

Ah, I see what I was doing wrong; I was spelling out "Charisma" I see you have "Char," how do you know what to put there? Like is Intelligence Intell, and Dexitary is Dexit, etc., etc...?

Funky Dynamite 08-03-2008 10:31 AM

Re: Superpowers
 
Oh, BTW, pass onto your friend my immense thanks! :)

manikus 08-03-2008 10:54 AM

Re: Superpowers
 
My "friend" is named Paul R. Stevens and he's one of the original coders of DC. :) He's the guy who created the GPDL engine to run all of these scripts. And all I did was know where to ask. :D He reads the Yahoo list and while he has been pretty inactive for the last couple of years, has announced that he is getting back into DC. :D:D:D In fact he's already been testing submitting new code to the CVS which is the first step towards the next version of DC. :) And to think, if you hadn't asked here, I wouldn't have asked there, and...Paul might have decided not to come back. So, thanks for asking questions. :D:D:D

Arminius 08-03-2008 11:05 AM

Re: Superpowers
 
Ok I see how it works now. I'm gonna start playing around with the GPDL thing and start asking lots of questions about it. Maybe in that way I can help push DC into the next version!

manikus 08-03-2008 11:42 AM

Re: Superpowers
 
Questions are good. :)

As far as the next version, all of the coders are saying the next version will be bug fixes. I presume some of those will be fixing GPDL up for us. :D I suspect (and this is just me not some official statement) that when GPDL is fixed up it will have some added capabilities.

But, please start learning about GPDL and ask questions. It's working on like 99% of things it's supposed to and a lot of what people think are bugs or unimplemented effects is simply our collective lack of knowledge on how to use GPDL. :D:D:D

By the by, talk is, next release, bug fixes, release after that...lots of new things. :D It's just talk right now, but hopefully we'll see that changing very quickly.

SilentThief 08-03-2008 03:31 PM

Re: Superpowers
 
Quote:

Originally Posted by Funky Dynamite (Post 1211494)
Ah, I see what I was doing wrong; I was spelling out "Charisma" I see you have "Char," how do you know what to put there? Like is Intelligence Intell, and Dexitary is Dexit, etc., etc...?

actually, char is a reference to a character. Any character, regardless of PC/NPC or monster. Monsters do not currently have stats scores (str, int, wis, ect), but a GPDL script that does 1d2 damage to a character HP score (as an example):

$SET_CHAR_HITPOINTS($TargetIndex(), "-1d2");

WILL work on monsters 'cuz they have hitpoints.

ST

manikus 08-03-2008 04:30 PM

Re: Superpowers
 
Thanks for pointing that out, ST. I missed it when I was responding earlier.

Monsters do have Intelligence (as a stat that is).

I'm of the persuasion that monsters don't need character stats. The way we use monsters now is like the Monster Manual. If you need a 'monster' with stats, there are as many NPC slots available as you need. :)

SilentThief 08-03-2008 04:40 PM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211520)
Thanks for pointing that out, ST. I missed it when I was responding earlier.

Monsters do have Intelligence (as a stat that is).

I'm of the persuasion that monsters don't need character stats. The way we use monsters now is like the Monster Manual. If you need a 'monster' with stats, there are as many NPC slots available as you need. :)

Only if we can make monster NPCs. On a side note, I remember reading somethin about this in one of the books. Instead of taking the time to stat up every creature, some spell that causes a loss of stats can be "faked". For example, a loss of str can have penalties to hit and/or damage. In the long run, would it make any difference?

As for the Int stat, currently this has no bearing on the (lack of) AI as well as no computer controlled chars use spells. But sooner or later we'll have these options working as well

ST

manikus 08-03-2008 04:50 PM

Re: Superpowers
 
Intelligence doesn't effect AI, now, but it could effect other stuff, like spells that require a certain intelligence to be effective, etc.

It will be nice when the monster AI is working. Then, we can have some real combat. :)

Funky Dynamite 08-04-2008 08:10 PM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211344)
Okay, I've got it now. :D

It is a bit more complicated than what we've been doing. :)

Here is the Activation Script:
Code:

$SET_CHAR_ASL($TargetIndex(),"strength25",25-#$GET_CHAR_STR($TargetIndex()));
$SET_CHAR_STR($TargetIndex(),25);

And the Deactivation Script:
Code:

$SET_CHAR_STR($TargetIndex(),$GET_CHAR_STR($TargetIndex())-#$GET_CHAR_ASL($TargetIndex(),"strength25"));

I meant the word in the quotes. Here, in the strength code, the word is "strength25." In the charisma code, "Char25" is in the quotes I believe. "Char" in this case I'm assuming refers to "charisma," not character. When I was trying to modify the strength code for charisma, it didn't work for some reason. I spelled out "charisma25," is that why?

manikus 08-04-2008 09:17 PM

Re: Superpowers
 
Quote:

Originally Posted by Funky Dynamite (Post 1211591)
I meant the word in the quotes. Here, in the strength code, the word is "strength25." In the charisma code, "Char25" is in the quotes I believe. "Char" in this case I'm assuming refers to "charisma," not character. When I was trying to modify the strength code for charisma, it didn't work for some reason. I spelled out "charisma25," is that why?

Is that exactly what you put in quotes? Including the comma? If it is, I think the comma may be the problem. Otherwise, it doesn't matter what you use for a variable name - the word in quotes, though it is probably best to not have it be a keyword (such as 'SET', 'GET', etc).

You can cut and paste your script up here and I can take a look at it for you.

Funky Dynamite 08-05-2008 12:35 AM

Re: Superpowers
 
..No.
I was trying to use proper grammer in the post and I messed up. I putr exactly "charisma20" in the code I was attempting to do.

manikus 08-05-2008 12:44 AM

Re: Superpowers
 
Paste your code in here so I can take a look at it. I would be more than happy to see if I can figure out how to correct it. :D

Funky Dynamite 08-05-2008 04:32 AM

Re: Superpowers
 
This is what I originally did:

The Activation Script:

$SET_CHAR_ASL($TargetIndex(),"charisma20",20-#$GET_CHAR_CHA($TargetIndex()));
$SET_CHAR_CHA($TargetIndex(),20);

The Deactivation Script:

$SET_CHAR_CHA($TargetIndex(),$GET_CHAR_CHA($Target Index())-#$GET_CHAR_ASL($TargetIndex(),"charisma20"));

I know you've already posted the script for the charisma (which I have). This is just what I did before you posted it. I'm wondering why it didn't work.

manikus 08-05-2008 11:49 PM

Re: Superpowers
 
The error is in your deactivation script. The second time you use "$TargetIndex" there is a space between Target and Index. If you remove the space, it will work fine. :)

Funky Dynamite 08-06-2008 10:39 AM

Re: Superpowers
 
...That's it? A space?
*bangs head on desk....*

manikus 08-06-2008 10:53 AM

Re: Superpowers
 
:D When I was first testing mine, I had put a comma instead of a semi-colon to end a line. :D It took me an hour to figure out. :D

Funky Dynamite 08-08-2008 09:15 AM

Re: Superpowers
 
Quote:

Originally Posted by manikus (Post 1211717)
The error is in your deactivation script. The second time you use "$TargetIndex" there is a space between Target and Index. If you remove the space, it will work fine. :)

It's strange, I checked my notes, there was no space where it was on the post. Anyway, I checked the code a couple nights ago, I modified the code for Con and it works perfectly. What I think was going on, was the character I was trying the code on, I tried -my- code on and ultimately failed. I think her stats are screwed up now, her Charisma's permanently 20, whatever I do I can't modify the stat. But, eh....
I made another character, and it works fine, now I think I can do it with any stat. More superhero stuff on the way! :)

manikus 08-08-2008 05:53 PM

Re: Superpowers
 
How did you create the unchangeable character? As an NPC? Or, did you modify a PC to give her such high CHA?

Funky Dynamite 08-16-2008 02:29 PM

Re: Superpowers
 
Yeah, PC. I altered her using the method I posted, then I was experimented on her with my own CHA item (before you posted the script). I must have screwed something up and made the CHA -permanently- 20. It's all good though.

manikus 08-16-2008 09:34 PM

Re: Superpowers
 
If she was saved with the CHA of 20, that makes it permanent. :) Until you create something to change it back, that is.

SilentThief 08-17-2008 02:53 PM

Re: Superpowers
 
makes for a very attractive and influential character.

ST

Funky Dynamite 08-18-2008 08:11 AM

Re: Superpowers
 
Quote:

Originally Posted by SilentThief (Post 1212993)
makes for a very attractive and influential character.

ST

Yeah, she is that. :)

Funky Dynamite 09-15-2008 09:57 AM

Re: Superpowers
 
Can you do the same with, let's say, Movement? Like make an item that increases it?


All times are GMT -4. The time now is 01:52 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved