Non-threaded

Forums » The Parlor Room » Read Thread

Questions about a storygame? Thoughts on Eternal? Any other IF you're playing out there?

Bo's Scripting Test 2.0

13 years ago

Thanks for playing and pointing out the errors in my scripting guys, and after all your help I've taken the suggestions and done my best to fix them. Please do me another favor and check it out to see if I still have some things I need to improve on: http://www.chooseyourstory.com/story/Bo's_Scripting_Test_2_0x2e_0.aspx . I only added the link because since this isn't the first time it's been published you can't find it in the Newly Published section.

Special thanks to Sindriv for helping out when I had some things I couldn't work out and looking over the story.

Bo's Scripting Test 2.0

13 years ago

Seems like a good base, though I did notice a few tweaks. First, I died and was shown the End Game Link, but for some reason, it just looped back to the same page. Not sure if this is problem on your side or a server spasm while I was playing.

 
Second thing I noticed was that you have links to attack after your HP drops to zero. Then you click on one (while dead) to go to the ‘death page’. You could add another link called "You Died" or the like and restrict it to (HP zero or less) and restrict the attack links to (HP 1 and above).
 

Bo's Scripting Test 2.0

13 years ago

1.) Really? That shouldn't' happen since it's a site-automated link, and it's never happened before. However, it might have something to do witht he IF %LIFE = 0 THEN $DEST := @PX IF %LIFE < 0 THEN %LIFE := 0 or something.

2.)  I realized that (and put the disclaimer in the description page), but since it didn't interfere with whether or not you lost I didn't think it needed fixing. Looking back that was probably just being lazy and I should have found a way to fix it. I didn't even consider link restrictions though, good thinking.

Bo's Scripting Test 2.0

13 years ago

I noticed that the Scripting for Page Destinations based on %LIFE gave me fits when I was first trying to add it to my Crab Arena game. I was able to get it working right, by putting all the %LIFE Variable Changes in the Script itself above the Page Destination Scripting. That and I had to get the nesting just right.

 
For example:
 
On an Enemy Attack link I would do something like this in the Script off the link itself:
 
%ATTACK := 1D20
IF %ATTACK < 10 THEN
 $DEST := @Px (miss page)
IF %ATTACK > 9 THEN
BEGIN
%LIFE := %LIFE - 1D6 + 2
IF %LIFE > 0 THEN
 $DEST := @Px (damage result page)
IF %LIFE < 1 THEN
 $DEST := @Px (death page)
END
 
You can even complicate it more, by balancing all the nesting – for example add 3 attack types to the enemies attack:
 
%ATTACK := 1D20
IF %ATTACK < 10 THEN
 $DEST := @Px (miss page)
IF %ATTACK > 9 THEN
BEGIN
%TYPE := 1D3
IF %TYPE = 1 THEN
BEGIN
%LIFE := %LIFE - 1D6 + 2
IF %LIFE > 0 THEN
 $DEST := @Px (damage result page)
IF %LIFE < 1 THEN
 $DEST := @Px (death page)
END
IF %TYPE = 2 THEN
BEGIN
%LIFE := %LIFE - 1D10
IF %LIFE > 0 THEN
 $DEST := @Px (damage result page)
IF %LIFE < 1 THEN
 $DEST := @Px (death page)
END
IF %TYPE = 3 THEN
BEGIN
%LIFE := %LIFE - 2D8 + 12
IF %LIFE > 0 THEN
 $DEST := @Px (damage result page)
IF %LIFE < 1 THEN
 $DEST := @Px (death page)
END
END
 
(My apologies if you know all of this already)

Bo's Scripting Test 2.0

13 years ago

haha, I'm not a talented scripter by any means (which is evident by the Scripting Test), and that example gave me a good idea and showed me different techniques I could use. Like instead of using two different lines of script to make make 0 take you to a page and then making everything less than 0 be equal to it, I could have just put < 1 and done it in on line. likewise I didn't think about making different attack types like that. Instead of using the three types so I could copy and paste or make it a global script I would just manually input different attack scripts for each attack. For example, I think the one for Chop (if not chop then stab) was

%DAMAGE := 1D10

%ACCURACY := 1D6

%LIFE := %LIFE-%ACCURACY

With the death and miss links in the global script. Instead I might have ben able to just write one wall of script like you did, and then copy and paste it to each option after specifying their type.

 

Bo's Scripting Test 2.0

13 years ago

You should include how much damage we do to the wolf on each page.

All the moves felt the same, except chop seemed to miss a lot for me.

At some point, the wolfs health actually went up from 6 to 9.

We should get a chance to block the wolfs attack since it get's a chance to dodge ours.

 

Not much else to say expect for go capitalism!

Bo's Scripting Test 2.0

13 years ago

Damn, I thought the adding life was fixed :/

how much damage you do is figured out with basic math as you see his health go down

Each one has different chances to hit, and different amounts of possible damage. The higher the potential damage, the higher chance it'll miss.

Good point, I factored in a new page for a complete miss, but I didn't add one for a wolf miss.

Bo's Scripting Test 2.0

13 years ago

I know it can be figured through basic math lol. Doesn't mean the player should have to do it.