Couple of plotscripting questions.
Moderators: Bob the Hamster, marionline, SDHawk
- JimLuc T Kirkard
- Red Slime
- Posts: 64
- Joined: Mon Mar 24, 2014 2:18 am
- Location: No idea
- Contact:
Couple of plotscripting questions.
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.
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.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
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.
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.
- sotrain515
- Red Slime
- Posts: 59
- Joined: Wed Dec 26, 2012 3:23 pm
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
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?
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?
- JimLuc T Kirkard
- Red Slime
- Posts: 64
- Joined: Mon Mar 24, 2014 2:18 am
- Location: No idea
- Contact:
There's only one hero at the moment. Here's the script.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.
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.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
So from my understanding, put fade out directly after the second text box, put "wait (5), fade in, wait"?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
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.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?
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.
Last edited by JimLuc T Kirkard on Tue Jul 29, 2014 4:54 pm, edited 1 time in total.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
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:
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.
fades always happen at the same speed.
If you want to fake a faster fade, you can do something like this:
Code: Select all
#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)
)
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.
- JimLuc T Kirkard
- Red Slime
- Posts: 64
- Joined: Mon Mar 24, 2014 2:18 am
- Location: No idea
- Contact:
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?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:
This method is a lot less smooth than the normal fade in/fade out commands.Code: Select all
#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) )
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.
- JimLuc T Kirkard
- Red Slime
- Posts: 64
- Joined: Mon Mar 24, 2014 2:18 am
- Location: No idea
- Contact:
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.TMC wrote:Did you edit the hero's battle menu? Did you give the hero any spell lists (that is, put spells in them)?
- Attachments
-
- battlemenu.jpg (43.13 KiB) Viewed 1354 times
Care to help me out by giving me advice on my game? Get the early demo by clicking here
Demo updated 8/13/2014
Demo updated 8/13/2014