Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

How do I script bikini?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Wed Feb 23, 2011 10:37 am    Post subject: How do I script bikini? Reply with quote

When item #70, the Bikini, is equipped, it's supposed to swap Hero 0's walkabout from set 1 to set 34 and his hero graphic from set 1 to set 8; change Hero 1 from walkabout 2 to walkabout 35 and hero graphic from set 6 to set 9; and change Hero 2's walkabout from set 3 to set 35 and her hero graphic to set 10. Naturally, unequipping said item should return the character in question to normal.

Thing is, my mind fizzles and burns every time I try to so much as look at the HamsterSpeak dictionary, much less try to grapple with syntax and whatnot. I've been thinking about asking about this for months, but as I just finished the bikini graphics for every character today, I finally got up the nerve to ask.
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Feb 23, 2011 11:12 am    Post subject: Reply with quote

This is pretty much identical to a question BlastedEarth asked a while back, the answer to which is here: http://www.castleparadox.com/ohr/viewtopic.php?p=84497#84497

Except because the only options in your game are bikini/no bikini, you'd replace the inner if blocks with just:
Code:
    if (check equipment (who, slot:armor) == item:bikini) then (
      set hero picture (who, 2, inside battle)
      set hero palette (who, 3, inside battle)
      set hero picture (who, 4, outside battle)
      set hero palette (who, 5, outside battle)
    ) else (
      reset hero picture (who, inside battle)
      reset hero palette (who, inside battle)
      reset hero picture (who, outside battle)
      reset hero palette (who, outside battle)
    )

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Thu Feb 24, 2011 11:23 am    Post subject: Reply with quote

Well, I do have other options, because each character also has a unique, ultimate armor. So this will be most helpful.

EDIT: I think I did everything right, but Hspeak isn't detecting my .hsi file.
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Blacklight_Studios
Expert of the third person...




Joined: 15 Dec 2010
Posts: 29

PostPosted: Thu Feb 24, 2011 1:07 pm    Post subject: Reply with quote

I'm afraid I'm gonna have to be the one who points out the obvious. Mock me if you feel the need.

I'd try exporting the .hsi file again through CUSTOM.exe.
_________________
Current project progress:

Lost in the Dark(Primary Project): 1%

Kingdom Hearts Collaborative Project: 0.05%
--
Back to top
View user's profile Send private message
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Thu Feb 24, 2011 7:52 pm    Post subject: Reply with quote

This happened after I exported the .hsi again today. Also, the file is clearly visible in the folder, but Hspeak can't seem to find it for whatever reason.
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Feb 24, 2011 10:16 pm    Post subject: Reply with quote

What are the exact name of the .hsi file, and the exact "include" line in your scripts file?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Feb 25, 2011 8:31 am    Post subject: Reply with quote

And are they in the same folder?
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Fri Feb 25, 2011 9:14 am    Post subject: Reply with quote

Quote:
What are the exact name of the .hsi file

maces wild.hsi

Quote:
and the exact "include" line in your scripts file?

include, plotscr.hsd
include, maces wild.hsi

Quote:
And are they in the same folder?

Yes.
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Feb 25, 2011 11:17 am    Post subject: Reply with quote

Ah ha. Recent versions of HSpeak require that you write
Code:
include, "maces wild.hsi"
instead if the filename contains a space. I've decided that this was a mistake, and will be reverting the requirement. Sorry for the trouble.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Fri Feb 25, 2011 12:21 pm    Post subject: Reply with quote

Okay, I finally got it to compile. It does fine changing everyone into their bikini graphics, and it also works when changing Ken and Lesley between the bikini and ultimate outfits, but it won't let Hera change back from her bikini graphics or let the other two return to their default appearances.

Code:
script, update equip graphics, begin
  variable (who)

  who := find hero (hero: kenneth)
  if (who <> -1) then (  # hero is in party

    if (check equipment (who, slot:torso) == -1) then (
      #nothing equipped
      reset hero picture (find hero(hero:Kenneth), inside battle)
      reset hero palette (find hero(hero:Kenneth), inside battle)
      reset hero picture (find hero(hero:Kenneth), outside battle)
      reset hero palette (find hero(hero:Kenneth), outside battle)
      reset hero picture (find hero(hero:Lesley), inside battle)
      reset hero palette (find hero(hero:Lesley), inside battle)
      reset hero picture (find hero(hero:Lesley), outside battle)
      reset hero palette (find hero(hero:Lesley), outside battle)
      reset hero picture (find hero(hero:Hera), inside battle)
      reset hero palette (find hero(hero:Hera), inside battle)
      reset hero picture (find hero(hero:Hera), outside battle)
      reset hero palette (find hero(hero:Hera), outside battle)
    )
# Bikini Time
    if (check equipment (find hero(hero:Kenneth), slot:torso) == item:bikini) then (
      set hero picture (find hero(hero:Kenneth), 8, inside battle)
      set hero palette (find hero(hero:Kenneth), 0, inside battle)
      set hero picture (find hero(hero:Kenneth), 34, outside battle)
      set hero palette (find hero(hero:Kenneth), 0, outside battle)
    )
    if (check equipment (find hero(hero:Lesley), slot:torso) == item:bikini) then (
      set hero picture (find hero(hero:Lesley), 9, inside battle)
      set hero palette (find hero(hero:Lesley), 13, inside battle)
      set hero picture (find hero(hero:Lesley), 35, outside battle)
      set hero palette (find hero(hero:Lesley), 13, outside battle)
    )
    if (check equipment (find hero(hero:Hera), slot:torso) == item:bikini) then (
      set hero picture (find hero(hero:Hera), 10, inside battle)
      set hero palette (find hero(hero:Hera), 0, inside battle)
      set hero picture (find hero(hero:Hera), 36, outside battle)
      set hero palette (find hero(hero:Hera), 0, outside battle)
    )
# Ultimate Armor Time
    if (check equipment (find hero(hero:Kenneth), slot:torso) == item:SWAP) then (
      set hero picture (find hero(hero:Kenneth), 5, inside battle)
      set hero palette (find hero(hero:Kenneth), 23, inside battle)
      set hero picture (find hero(hero:Kenneth), 31, outside battle)
      set hero palette (find hero(hero:Kenneth), 23, outside battle)
    )
    if (check equipment (find hero(hero:Lesley), slot:torso) == item:Ulfson) then (
      set hero picture (find hero(hero:Lesley), 6, inside battle)
      set hero palette (find hero(hero:Lesley), 13, inside battle)
      set hero picture (find hero(hero:Lesley), 32, outside battle)
      set hero palette (find hero(hero:Lesley), 13, outside battle)
    )
    if (check equipment (find hero(hero:Kenneth), slot:torso) == item:HazMat) then (
      set hero picture (find hero(hero:Kenneth), 7, inside battle)
      set hero palette (find hero(hero:Kenneth), 25, inside battle)
      set hero picture (find hero(hero:Kenneth), 33, outside battle)
      set hero palette (find hero(hero:Kenneth), 25, outside battle)
    )
    #....
  )

  who := find hero (hero: tobmac)
  if (who <> -1) then (  # hero is in party
    #...
  )
end

What did I get wrong?
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Feb 25, 2011 1:20 pm    Post subject: Reply with quote

This looks correct for bikini, ultimate, and no armor, but it will be wrong for any other armor.

I think you can make it work the way you expect my removing the:
Code:
if (check equipment (who, slot:torso) == -1) then (


All those "reset hero picture" should happen without any "if" check.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Feb 26, 2011 7:32 am    Post subject: Reply with quote

Hmm, that's not what I intended. I meant this:

Code:

script, update equip graphics, begin
  variable (who)

  who := find hero (hero: kenneth)
  if (who <> -1) then (  # hero is in party
    reset hero picture (who, inside battle)
    reset hero palette (who, inside battle)
    reset hero picture (who, outside battle)
    reset hero palette (who, outside battle)

    # Bikini Time
    if (check equipment (who, slot:torso) == item:bikini) then (
      set hero picture (who, 8, inside battle)
      set hero palette (who, 0, inside battle)
      set hero picture (who, 34, outside battle)
      set hero palette (who, 0, outside battle)
    )
    # Ultimate Armor Time
    if (check equipment (who, slot:torso) == item:SWAP) then (
      set hero picture (who, 5, inside battle)
      set hero palette (who, 23, inside battle)
      set hero picture (who, 31, outside battle)
      set hero palette (who, 23, outside battle)
    )
    if (check equipment (who, slot:torso) == item:HazMat) then (
      set hero picture (who, 7, inside battle)
      set hero palette (who, 25, inside battle)
      set hero picture (who, 33, outside battle)
      set hero palette (who, 25, outside battle)
    )
  )

  who := find hero (hero: Lesley)
  if (who <> -1) then (  # hero is in party
    reset hero picture (who, inside battle)
    reset hero palette (who, inside battle)
    reset hero picture (who, outside battle)
    reset hero palette (who, outside battle)

    if (check equipment (who, slot:torso) == item:bikini) then (
      set hero picture (who, 9, inside battle)
      set hero palette (who, 13, inside battle)
      set hero picture (who, 35, outside battle)
      set hero palette (who, 13, outside battle)
    )
    if (check equipment (who, slot:torso) == item:Ulfson) then (
      set hero picture (who, 6, inside battle)
      set hero palette (who, 13, inside battle)
      set hero picture (who, 32, outside battle)
      set hero palette (who, 13, outside battle)
    )
  )

  who := find hero (hero: Hera)
  if (who <> -1) then (  # hero is in party
    reset hero picture (who, inside battle)
    reset hero palette (who, inside battle)
    reset hero picture (who, outside battle)
    reset hero palette (who, outside battle)

    if (check equipment (who, slot:torso) == item:bikini) then (
      set hero picture (who, 10, inside battle)
      set hero palette (who, 0, inside battle)
      set hero picture (who, 36, outside battle)
      set hero palette (who, 0, outside battle)
    )
  )
end

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Tue Mar 01, 2011 12:07 pm    Post subject: Reply with quote

Okay, now it works except that it still won't load Hera's haz-mat graphic.
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Tue Mar 01, 2011 12:55 pm    Post subject: Reply with quote

Ronin Catholic wrote:
Okay, now it works except that it still won't load Hera's haz-mat graphic.


It looks like you are checking Kenneth for the Hazmat, not Hera.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ronin Catholic
Deadliest of Fairies




Joined: 23 Jul 2007
Posts: 530
Location: My Girlfriend

PostPosted: Tue Mar 01, 2011 8:38 pm    Post subject: Reply with quote

It works now!




And I can also use this script in another game, which will have a -lot- more alternate costumes.
_________________
"I didn't start the flame war;
I don't know what you thought here
'Twas that way when I got here"

"I didn't start the flame war;
I can't understand a word you're saying
nor the game you're playing~"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group