| Greater functionality with a time script | |
|
Author | Message |
---|
kaele7 Novice Adventurer
Number of posts : 13 Adventure Points : 0 Registration date : 2008-10-08
| Subject: Greater functionality with a time script Wed Oct 08, 2008 8:59 pm | |
| I've got this currently for my wintitle time script. It's a variation on the one posted here, but it forces it into a 12hr format with am and pm. What I was wondering if it would be possible to implement some type of % variable like cyclic, random, or trust messages to be used based on these flag values. Something that would allow four different location descriptions based on whether it's sunrise, daytime, sunset, and nighttime. It would greatly help in varying location texts without mucking it up with scripts that post "The sun is beginning to rise" at the bottom of the description before the exits are printed.
[start]turns=0[acts]flag60=5#flag61=46#flag62=11[end]
[start]turns>0[acts]incflag61,1[end]
[start]flag61=60[acts]flag61=0#incflag60,1#incflag62,1[end]
[start]flag60=13[acts]flag62=1[end]
[start]flag60=24[acts]flag60=1[end] [start]flag60>11#flag60<24#flag61<10[acts]wintitleTime: %flag62%:0%flag61%pm.[end]
[start]flag60>11#flag60<24#flag61>9[acts]wintitleTime: %flag62%:%flag61%pm.[end] [start]flag60<12#flag61<10[acts]wintitleTime: %flag60%:0%flag61%am.[end]
[start]flag60<12#flag61>9[acts]wintitleTime: %flag60%:%flag61%am.[end]
[start]flag60=23#flag61<10[acts]wintitleTime: %flag62%:0%flag61%am.[end]
[start]flag60=23#flag61>9[acts]wintitleTime: %flag62%:%flag61%am.[end]
Also is there anyway to append a message DIRECTLY after the location description without creating a new line? Basically I'm picking and don't like the object system message format, or the fact that it comes after the exits. I'd rather have everything described in the location as one streamlined chunk without pointing things out explicitly. |
|
| |
catventure Admin Adventurer
Number of posts : 404 Age : 71 Location : UK Humor : Enjoys a laugh! Adventure Points : 77 Registration date : 2008-06-08
| Subject: Re: Greater functionality with a time script Wed Oct 08, 2008 10:03 pm | |
| Hi Kaele7, Your clock/time script is very similar to the alternative one I posted to the TAB email group recently. 12 hour am/pm. I have reproduced it below '=============== [start]turns=0[acts]flag60=12#flag61=0#flag62=1[end] [start]turns>0[acts]incflag61,1[end] [start]flag61=60[acts]flag61=0#incflag60,1[end] [start]flag60>12[acts]decflag60,12[end] [start]flag60<10#flag61<10#flag62=0[acts]wintitleThe time is 0%flag60%:0%flag61% pm.[end] [start]flag60<10#flag61<10#flag62=1[acts]wintitleThe time is 0%flag60%:0%flag61% am.[end] [start]flag60<10#flag61>9#flag62=0[acts]wintitleThe time is 0%flag60%:%flag61% pm.[end] [start]flag60<10#flag61>9#flag62=1[acts]wintitleThe time is 0%flag60%:%flag61% am.[end] [start]flag60>9#flag61<10#flag62=0[acts]wintitleThe time is %flag60%:0%flag61% pm.[end] [start]flag62=1#flag60=12#flag61=0[acts]wintitleThe time is 12 noon.#flag62=0#jumpPUSH[end] [start]flag62=0#flag60=12#flag61=0[acts]wintitleThe time is 12 midnight.#flag62=1#jumpPUSH[end] [start]flag60>9#flag61<10#flag62=1[acts]wintitleThe time is %flag60%:0%flag61% am.[end] [start]flag60>9#flag61>9#flag62=0[acts]wintitleThe time is %flag60%:%flag61% pm.[end] [start]flag60>9#flag61>9#flag62=1[acts]wintitleThe time is %flag60%:%flag61% am.[end] PUSH: rem: rest of Script 2 code goes below this.... '================== The only difference is it allows the "noon" and "midnight" message. It starts at 12 noon. I will think about your suggestions. Just need some time to figure stuff out. Also I will look into the append without newline for location text when adding text in Script 1.... If you don't like the objects listed you can use the "objlistoff" action as was done in the "Crystal Keepers" demo game - but they will still be printed after the exits. http://tab.thinbasic.com/crystal_keepers.zip (password is: 12345) catventure. |
|
| |
kaele7 Novice Adventurer
Number of posts : 13 Adventure Points : 0 Registration date : 2008-10-08
| Subject: Re: Greater functionality with a time script Wed Oct 08, 2008 10:35 pm | |
| Eureka! Thank you very much. I had forgotten about looking through the crystal keepers code for ideas. |
|
| |
kaele7 Novice Adventurer
Number of posts : 13 Adventure Points : 0 Registration date : 2008-10-08
| Subject: Re: Greater functionality with a time script Wed Oct 08, 2008 11:01 pm | |
| Also I have a question about Crystal Keepers. Why do many of the examine response entries display an objmess instead of just a mess? |
|
| |
catventure Admin Adventurer
Number of posts : 404 Age : 71 Location : UK Humor : Enjoys a laugh! Adventure Points : 77 Registration date : 2008-06-08
| Subject: Re: Greater functionality with a time script Thu Oct 09, 2008 8:05 am | |
| Hi Kaele,
A reasonable comment, Kaele. Crystal_Keepers.tab by Doreen Bardon is a medium size adventure which I ported from the older CAT creator and as such it is a rather unorthodox example of TAB coding... It was just easier to do it that way when transferring entries and recoding the conditions and actions. However, as a rule, I would not recommend following that procedure of using unused object messages for other types of messages when building a new adventure in TAB. Also, the game was constructed very early on in the development of TAB. It was done primarly as an exercise to see how TAB would respond to a fair sized game and also to help in early bug-testing to locate and weed out discrepancies. Hope that answers your query.
Regards, Phil. |
|
| |
kaele7 Novice Adventurer
Number of posts : 13 Adventure Points : 0 Registration date : 2008-10-08
| Subject: Re: Greater functionality with a time script Thu Oct 09, 2008 9:22 pm | |
| I tried objlistoff and it doesn't seem to have any effect. I also tried playing with invlistoff and it doesn't do anything noticeable either. Also I'm having trouble getting %c% to work correctly. |
|
| |
catventure Admin Adventurer
Number of posts : 404 Age : 71 Location : UK Humor : Enjoys a laugh! Adventure Points : 77 Registration date : 2008-06-08
| Subject: Re: Greater functionality with a time script Fri Oct 10, 2008 8:56 am | |
| - kaele7 wrote:
- I tried objlistoff and it doesn't seem to have any effect. I also tried playing with invlistoff and it doesn't do anything noticeable either. Also I'm having trouble getting %c% to work correctly.
Hi Kaele, The "objlistoff" and "invlistoff" commands are working OK. See "Crystal Keepers" database and look in first entries of Script 1 and Script 2 for example usage. Can you please elaborate on how you are trying to use the %c% tags and what sort of trouble you're having as there are limitations on the use of cyclic elements. They only really work properly in Messages, Locations and some System Messages. Thanks. Regards, catventure. |
|
| |
kaele7 Novice Adventurer
Number of posts : 13 Adventure Points : 0 Registration date : 2008-10-08
| Subject: Re: Greater functionality with a time script Fri Oct 10, 2008 10:58 am | |
| Well I tried putting objlistoff in script one, and invlistoff in script two like crystal keepers. It's still not working as I expected. I guess it seems like it changed from listing them in an ordered list to listing them in a sentence with comma separators. As for the %c%:
I've tried them both in response entries like:
[start]talk to kelissa#charpresent3#room=4[acts]cmess%c%Why hello darling. Do find yourself something to do won't you? You're not the type I like to be seen in public with. Now scoot!%c%I'm sorry, didn't you hear me the first time? Get going!%c%I said get lost![end]
and in messages:
[start]talk to kelissa#charpresent3#room=4[acts]mess3[end]
Message 3 %c%Why hello darling. Do find yourself something to do won't you? You're not the type I like to be seen in public with. Now scoot!%c%I'm sorry, didn't you hear me the first time? Get going!%c%I said get lost! |
|
| |
catventure Admin Adventurer
Number of posts : 404 Age : 71 Location : UK Humor : Enjoys a laugh! Adventure Points : 77 Registration date : 2008-06-08
| Subject: Re: Greater functionality with a time script Fri Oct 10, 2008 12:06 pm | |
| - kaele7 wrote:
- Well I tried putting objlistoff in script one, and invlistoff in script two like crystal keepers. It's still not working as I expected. I guess it seems like it changed from listing them in an ordered list to listing them in a sentence with comma separators.
Hi Kaele. Yes that is right. That is what they are supposed to do. Perhaps I'm misunderstanding your intention. Maybe you are wanting to create a "scenery object" or "hidden type object" ie. an object that does not appear in the object listing beneath the "exits" info. In other words something mentioned in the location text description or an item indicated in a message text that the user can interact with instead? Location Description: You are in a shady glade encompassed by a vast tract of woodland. The sound of running water can be heard in the distance. A tall tree stands in the midst of small bushes and thorny undergrowth. You can smell the scent of azaleas and primroses. The wood seems thicker to the north through the hazy mist. Exits lead: north, east, west. If the 'tree' were a true static object then it would be listed under the 'You can also see:' System Message thus alerting the player to the fact it held some special significance in the game and deserved some further inspection. By 'hiding' or 'masking' it within the confines of the location text description no undue attention is drawn to it. Cleverly disguising things, articles and items important to the game within the location text OR within messages can make a game more interesting and less 'easier' to solve. The player has to proceed cautiously and try more inputs in case anything is missed. In this case "tree", "bushes" "undergrowth" etc. might conceivable be ordinary nouns in the Vocab for which Response coding could be made to create real objects after some interaction with them As for the %c%: It will not work in "cmess" action. Sorry. Cyclic messages can repeat cycle or stop at the last element of a cyclic message (using the %end% tag) %c%I am text element 1. %c%I am text element 2. %c%I am text element 3. %c% or %c%I am text element 1. %c%I am text element 2. %c%%end%I am text element 3. %c% To call a cyclic message use the "cyclemessX" action: [start]talk to kelissa#charpresent3#room=4[acts] cyclemess3[end] Here is how your message should look: Message 3 ======= %c%Why hello darling. Do find yourself something to do won't you? You're not the type I like to be seen in public with. Now scoot! %c%I'm sorry, didn't you hear me the first time? Get going! %c%I said get lost! %c% Cheers, catventure. |
|
| |
kaele7 Novice Adventurer
Number of posts : 13 Adventure Points : 0 Registration date : 2008-10-08
| Subject: Re: Greater functionality with a time script Fri Oct 10, 2008 1:59 pm | |
| Thank you so much. I'm trying not to be a hassle lol. And as for the objlistoff, I was under the impression it completely turned off the listing of objects in a room. As in I could have visible objects that were actually located in the room, but they wouldn't be explicitly noted to the player outside of the description text.
That said I think I have decided that I can live with the objects being listed in most cases, just a reworking of the sysmess and format and it looks acceptable. Thanks again.
Edit: I tried cyclemess3, it's not a valid command. |
|
| |
catventure Admin Adventurer
Number of posts : 404 Age : 71 Location : UK Humor : Enjoys a laugh! Adventure Points : 77 Registration date : 2008-06-08
| Subject: Re: Greater functionality with a time script Fri Oct 10, 2008 5:13 pm | |
| OK. Thanks Kaele. I can confirm "cyclemessX" action is broken. It is now fixed and I have released new update today at 17:00GMT together with other changes. http://tab.thinbasic.com/(Info in "Announcements" forum) Please let me know if you now have success with cyclemessX action. Thanks, Phil. |
|
| |
kaele7 Novice Adventurer
Number of posts : 13 Adventure Points : 0 Registration date : 2008-10-08
| Subject: Re: Greater functionality with a time script Fri Oct 10, 2008 8:28 pm | |
| Well I just tried downloading the newest version and it seems to be the previous version. The readme isn't updated, and cyclemess still is invalid.
Also, I don't know if it's just me. But there's some weird typing issue going on with the message boxes for location, message, objects, and characters. It's not a huge thing, I can just copy them to notepad to make my edits, but it just started happening. |
|
| |
catventure Admin Adventurer
Number of posts : 404 Age : 71 Location : UK Humor : Enjoys a laugh! Adventure Points : 77 Registration date : 2008-06-08
| Subject: Re: Greater functionality with a time script Sat Oct 11, 2008 8:50 am | |
| - kaele7 wrote:
- Well I just tried downloading the newest version and it seems to be the previous version. The readme isn't updated, and cyclemess still is invalid.
Also, I don't know if it's just me. But there's some weird typing issue going on with the message boxes for location, message, objects, and characters. It's not a huge thing, I can just copy them to notepad to make my edits, but it just started happening. Hi Kaele, Sorry to hear that. It's very odd. It works Ok on mine - no problem with editing message boxes. Strange. I downloaded latest version again to check but everything seemed OK. No-one else has reported similar error. Also readme file is latest and cyclemess working... Possibly when you downloaded it got corrupted somehow. It can happen. I know it sounds silly - but did you unzip the file first? Regards, Phil. |
|
| |
Sponsored content
| Subject: Re: Greater functionality with a time script | |
| |
|
| |
| Greater functionality with a time script | |
|