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

items and leveling up
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Fri Jan 23, 2009 8:22 pm    Post subject: items and leveling up Reply with quote

Can you not set up items that you can only buy at certain levels i can't seem to find an option like that anywhere?

this is serious i may have to redesign the world if i can't do this ?

maybe i'm just over looking something any help people?


or do i set it up with super high cash amounts so that you would more then likily be this level to get this item?
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 Jan 23, 2009 9:59 pm    Post subject: Reply with quote

There is no built in method of making an item that is only available at a certain level, but you could do it with tags and a simple plotscript.

Name a tag something like "level over 10".

Then you add an item to the shop and make it only available if the "level over 10" tag is ON.

Then you can make a plotscript like this:

Code:
plotscript, set level tag, begin
  if(get hero level(find hero(hero:Bob)) >> 10)
    then(set tag(tag:level over 10, ON))
    else(set tag(tag:level over 10, OFF))
end


And make sure that the script gets run before the shop.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sat Jan 24, 2009 10:42 am    Post subject: Reply with quote

thanks james, man why didn't i think of that.


well i'm still new to this so i'm sorry about all these annoying questions this is my first game with this system so i'm having a little trouble with it.
Back to top
View user's profile Send private message
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Fri Jan 30, 2009 8:35 pm    Post subject: Reply with quote

Hey just wondering if theres a way i could set the tag up with the shop it has a buy tag option, is there and easier way then using the plotscript or other way just curious?
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 Jan 30, 2009 9:14 pm    Post subject: Reply with quote

I'm not sure what you're asking, but there's no way to avoid using a plotscript here.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sat Jan 31, 2009 7:54 pm    Post subject: Reply with quote

yeh thats pratically what i asked and thanks i was just wondering.
Back to top
View user's profile Send private message
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sat Jan 31, 2009 9:48 pm    Post subject: Reply with quote

For some reason it won't work. I've tried several methods of programming it in but it still won't work. Maybe it needs to be told to preform the plotscript right after a battle with some sort of command which i have no knowledge of.

heres the code :
Code:

include, plotscr.hsd
include, NES_STAR.hsi


define script(1,Item,none)

plotscript,Item,begin,

if(get hero level(find hero(hero:Titas)) >> 1)
then(set tag(tag:level over 1, ON))
else(set tag(tag:level over 1, OFF))
end



I don't understand why it won't work, all i'm trying to do is test out the code and make an oldglove appear in the shop but for some reason it won't respond it seems.

Any ideas or help would be appreciated with my luck i missed something simple tho.
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Sat Jan 31, 2009 11:13 pm    Post subject: Reply with quote

Your script looks fine. Check the store stock (make sure it's set to infinite) and try it with a fresh game. (edit: fresh save file, that is)
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Feb 01, 2009 12:43 am    Post subject: Reply with quote

Yes, you need to make sure the script runs sometime between any battle and entering the shop. You could set it to the afterbattle script on every map, but it would be easier to call it right before the shop. Assuming you access the shop by attaching it to a textbox, just attach the script directly to the NPC that calls the textbox. The script is run immediately when you activate the NPC.

You can see which tags are set with the F4 debug key. See 'Debugging Keys'
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sun Feb 01, 2009 9:35 am    Post subject: Reply with quote

I'll try with a fresh game i was worried it might have something to do with that and thats one of the few things i diddn't try i'll try that out.

Also yeh i tried something similar to what your describing mad cati it didn't work but i'll try exactly what you've described here since its a bit diffrent from what i did.

thanks for the help i'll let you guys know how it goes.

edit:

Alright i got it to work it was a very simple thing i over looked like i thought i feel retarted. Then again i havn't worked with this plotscripting for about 5 months so i guess mistakes are bound to be made at first till i get the hang of it. I proably won't have any more questions for a little while till i get to the actual story k guys thanks for the help.

edit:

Sorry but i need to know if i can do this with code check this and wil it work guys

Code:
include, plotscr.hsd
include, NES_STAR.hsi


define script(1,Item,none)

plotscript,Item,begin,

if(get hero level(find hero(hero:Scythe)) >> 2)
then(set tag(tag:level over 2, ON))
else(set tag(tag:level over 2, OFF))

if(get hero level(find hero(hero:Scythe)) >> 4)
then(set tag(tag:level over 4, ON))
else(set tag(tag:level over 4, OFF))

if(get hero level(find hero(hero:Scythe)) >> 5)
then(set tag(tag:level over 5, ON))
else(set tag(tag:level over 5, OFF))

if(get hero level(find hero(hero:Scythe)) >> 6)
then(set tag(tag:level over 6, ON))
else(set tag(tag:level over 6, OFF))

if(get hero level(find hero(hero:Scythe)) >> 7)
then(set tag(tag:level over 7, ON))
else(set tag(tag:level over 7, OFF))

if(get hero level(find hero(hero:Scythe)) >> 9)
then(set tag(tag:level over 9, ON))
else(set tag(tag:level over 9, OFF))

if(get hero level(find hero(hero:Scythe)) >> 14)
then(set tag(tag:level over 14, ON))
else(set tag(tag:level over 14, OFF))

if(get hero level(find hero(hero:Scythe)) >> 15)
then(set tag(tag:level over 15, ON))
else(set tag(tag:level over 15, OFF))

if(get hero level(find hero(hero:Scythe)) >> 29)
then(set tag(tag:level over 29, ON))
else(set tag(tag:level over 29, OFF))

if(get hero level(find hero(hero:Scythe)) >> 30)
then(set tag(tag:level over 30, ON))
else(set tag(tag:level over 30, OFF))

if(get hero level(find hero(hero:Scythe)) >> 49)
then(set tag(tag:level over 49, ON))
else(set tag(tag:level over 49, OFF))

end
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: Sun Feb 01, 2009 8:18 pm    Post subject: Reply with quote

Yes, that's fine.

By the way, you don't have to have this line:
define script(1,Item,none)
That's obsolete. Using plotscript instead of script to start your script makes it visible in Custom for assigning to triggers.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sun Feb 01, 2009 9:16 pm    Post subject: Reply with quote

k i thought it would work just making sure so i don't have to go back and tweak everything over again was very tedious and annoying to do first time.

K thanks


edit: great now i'm having this problem a real one


Any suggestions or ideas one whats going on would be appreciated.
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: Mon Feb 02, 2009 6:46 am    Post subject: Reply with quote

Wow! A new HSpeak crash bug, those are very rare.

In this case it's obvious what the problem is: you've attempted to divide a constant expression by zero, like this:
wait (100/0)

I'll update HSpeak to throw a helpful error message instead. By coincidence I was just working on HSpeak when I paused to check CP.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Mon Feb 02, 2009 8:56 am    Post subject: Reply with quote

Ooo i see, i was worried about it taking / as a division sign instead of the name of the tag which was tag:over level 4/

I'll just switch it up and it should work, i'll watch out for that next time but yeh i finished all the codeing for all the basic wep, and armor items. (as soon as i fix this small problem)
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: Tue Feb 03, 2009 9:30 am    Post subject: Reply with quote

Custom strips characters like / from constant names when it generates .HSI files. Have a look.
I guess what it should really do is print a warning when it has to remove something.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
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