Post new topic    
Couple of plotscripting questions. 
 PostTue Jul 29, 2014 1:28 pm
Send private message Reply with quote
I finally got back into the swing of my plot scripting last night, and it's actually easier this time around since I'm running Windows 7 as opposed to 95, 98, or XP and Custom is windowed and I can just swap over to notepad, save, test game.There were two things I couldn't get it to do, though. I wanted the screen to be black for the first two text boxes, then fade in to show the character. I used a black backdrop on those two and after show text box 1, used fade screen out. After show text box 2, I used wait for text box and fade screen in. I figured it would fade out behind the backdrop creating the illusion it was already faded, but it didn't work, it behaves as though the text boxes just had black backdrops.

The other one was fight formation. This worked, however once the battle is over it didn't stop long enough to give the character XP, it just exited the battle screen right away. I had it set up to level up the character after that first battle. My fix was to make a text box after give $10 and that being the last text of the script I used the give experience command in the plotscript. I got it to basically do what I want except for those two things, but I had planned to use these commands quite a bit through the course of the game for cinematics, so figured I'd better ask now. I did a Google search, but came up empty.
Liquid Metal King Slime
Send private message
 
 PostTue Jul 29, 2014 2:39 pm
Send private message Reply with quote
I don't think I understand the text box fade problem you are describing. Maybe you could post the script?

Fight formation should definitely give experience as normal, exactly like a random battle will.

Were you aware that experience is divided between the heroes? So if you have 4 heroes, and they beat an enemy that gives 100 experience, they will each earn 25 exp.
Red Slime
Send private message
 
 PostTue Jul 29, 2014 2:39 pm
Send private message Reply with quote
Well, I can't really help you with your second question... or your first, actually! But I can link you to this thread where people go into some detail about the eccentricities of the "fade screen in" and "fade screen out" commands: www.slimesalad.com/forum/viewtopic.php?t=5216
Metal King Slime
Send private message
 
 PostTue Jul 29, 2014 3:54 pm
Send private message Reply with quote
It sounds like you might be trying to fade out the map but not the textbox. Unforuntately you can't really do that, screen fades fade out everything. (You would have to use separate parts of the master palette for the textbox and the map and manipulate the palette manually)

Double check that the enemies are set to give experience. You aren't ending the battle with an attack with a bit turned on to end the battle immediately, are you?
 
 PostTue Jul 29, 2014 4:12 pm
Send private message Reply with quote
Bob the Hamster wrote:
I don't think I understand the text box fade problem you are describing. Maybe you could post the script?

Fight formation should definitely give experience as normal, exactly like a random battle will.

Were you aware that experience is divided between the heroes? So if you have 4 heroes, and they beat an enemy that gives 100 experience, they will each earn 25 exp.

There's only one hero at the moment. Here's the script.
Quote:
include, plotscr.hsd
include, jamesdopp.hsi

plotscript, forstarters, begin
suspend player
show backdrop (5)
fade screen out
show text box (5)
wait for text box
show text box (6)
wait for text box
show map
fade screen in
wait (15)
show text box (7)
wait for text box
set hero speed (me, 8)
set hero direction (me, east)
walk hero (me,east,2)
wait for hero (me)
set hero direction (me,north)
set hero speed (me, 4)
wait for hero (me)
wait (20)
destroy NPC (2)
wait (20)
fight formation (1)
show text box (16)
wait for text box
give experience (me,30)
resume player
end

as far as the text box fade, I wasn't wanting to fade the text box, I wanted the screen to be black with the first couple of text boxes that introduce the hero, then after the last text box, the screen fades in to show the hero from the start position.


sotrain515 wrote:
Well, I can't really help you with your second question... or your first, actually! But I can link you to this thread where people go into some detail about the eccentricities of the "fade screen in" and "fade screen out" commands: www.slimesalad.com/forum/viewtopic.php?t=5216


So from my understanding, put fade out directly after the second text box, put "wait (5), fade in, wait"?



TMC wrote:
It sounds like you might be trying to fade out the map but not the textbox. Unforuntately you can't really do that, screen fades fade out everything. (You would have to use separate parts of the master palette for the textbox and the map and manipulate the palette manually)

Double check that the enemies are set to give experience. You aren't ending the battle with an attack with a bit turned on to end the battle immediately, are you?


There are two enemies and each give 15xp. I planned it that way so you get to level up right off the bat. And, yeah, there's a text box set to appear right after the battle. When I checked status once the script finished, no XP was gained.


Edit: Thanks guys, it's fixes now. To my embarrassment it turns out I actually DID forget toput an XP reward on the enemy. I really thought I did.The fade was fixed by putting fade screen out right after the last text along with wait 15 and fade screen in. Is there any way to make it fade slower? Also, is there a way to make it so heroes don't have their stats restored after battle unless they level up? I only found the one where they don't have it restored after a level up.
Liquid Metal King Slime
Send private message
 
 PostTue Jul 29, 2014 5:08 pm
Send private message Reply with quote
Glad you got it working!

fades always happen at the same speed.

If you want to fake a faster fade, you can do something like this:

Code:

#Faster fade out
variable(i)
for(i, 0, 7) do(
  tweak palette(-8, -8, -8)
  update palette
  wait(1)
)

#Faster fade in
variable(i)
for(i, 7, 0, -1) do(
  reset palette
  tweak palette(-8 * i, -8 * i, -8 * i)
  update palette
  wait(1)
)


This method is a lot less smooth than the normal fade in/fade out commands.

Hero's HP and MP are only automatically restored after battle if they level up. If they do not level up they will not be healed.
 
 PostTue Jul 29, 2014 6:47 pm
Send private message Reply with quote
Bob the Hamster wrote:
Glad you got it working!

fades always happen at the same speed.

If you want to fake a faster fade, you can do something like this:

Code:

#Faster fade out
variable(i)
for(i, 0, 7) do(
  tweak palette(-8, -8, -8)
  update palette
  wait(1)
)

#Faster fade in
variable(i)
for(i, 7, 0, -1) do(
  reset palette
  tweak palette(-8 * i, -8 * i, -8 * i)
  update palette
  wait(1)
)


This method is a lot less smooth than the normal fade in/fade out commands.

Hero's HP and MP are only automatically restored after battle if they level up. If they do not level up they will not be healed.


Ok, thanks. By the way, for some reason my attacks are showing up twice in the battle menu. Not quite sure what I did there. Do you know what it might be?
Metal King Slime
Send private message
 
 PostWed Jul 30, 2014 9:58 am
Send private message Reply with quote
Did you edit the hero's battle menu? Did you give the hero any spell lists (that is, put spells in them)?
 
 PostThu Jul 31, 2014 3:58 am
Send private message Reply with quote
battlemenu.jpg
TMC wrote:
Did you edit the hero's battle menu? Did you give the hero any spell lists (that is, put spells in them)?


Here's a screen of that. Don't remember if I did that or not. There are no spells yet. I did make his default weapon the sword and put that in his inventory.
Care to help me out by giving me advice on my game? Get the early demo by clicking here
Demo updated 8/13/2014
Metal King Slime
Send private message
 
 PostThu Jul 31, 2014 5:09 am
Send private message Reply with quote
'Weapon' appears twice, that's the problem. The bottom option is normally "Items". I assume you changed it accidentally, but if you're sure you didn't, then it's possible that it's an engine bug.
Display posts from previous: