Well-Actually War Trall Archmagus Micael Posted September 4, 2005 Share Posted September 4, 2005 Guys, I've decided to revive ETS, but I'll need some help with it. 1) Is there a moster script which checks what the party's level is, and sets that as X, and then sets it's own level as X+1, for example? That way my monsters can be modified to make them slightly higher, or lower than the party, giving them a fair fight the whole way through. 2) I know it is possible, but I don't quite know how to set it so that at night time I enter cave A, and at daytime I enter cave B. I know it's to do with timers, but my only experiments into timers ended in unmitigated disaster. 3) Kel, is it okay if I use that cutscene speed ability of your from Bahs? I should be able to take it from there, if that's okay with you. 4) Cutscene spellfighting. I've noticed that putting effects on characters don't seem to work right. I just get a white square appearing on them. It hppens on both my computer and Mum's XP. IS that a bug or something? Thanks! I think that's all the help I need for now (but I can be a bit stupid sometimes ) - Archmagus Micael Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted September 4, 2005 Share Posted September 4, 2005 1) No such script exists at the moment. There does exist a script for checking the party's level (it's in the HLPM, and I'm pretty sure it's archived at the Codex too). It wouldn't be hard to make a script such as you describe by modifying that. 2) The easiest way is probably to set an SDF to one value during the day, another value at night, and use a Variable Town Entry linked to that SDF. To do that you'll have to familiarise yourself with how to make a timer, though. 3) TM's used the Set Cutscene Speed ability in his scenarios too, and it was based on my suggestion in the first place, so I think I'm on pretty solid ground in saying that you can use it. 4) Are you sure you're using valid effect numbers for the calls you're using? Are you using run_animation() calls at the correct times? If you confirm that neither of these is the problem and it still doesn't work right, show us your script. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 4, 2005 Share Posted September 4, 2005 2) Night and day coding is not too hard, but it does involve a lot of long if statements. When I was writing my scenario, I used it to only have wandering monsters at night. You should be able to modify this outdoor script without too much trouble: Code: //Outdoor section script// Section (1,0)beginoutdoorscript;variables;body;beginstate INIT_STATE;//if you come to the section in night, it places the encounters,//except if it already has if (((get_current_tick() < 625) || (get_current_tick() > 4375 && get_current_tick < 5625) || (get_current_tick() > 9375 && get_current_tick < 10625) || (get_current_tick() > 14375 && get_current_tick < 15625) || (get_current_tick() > 19375 && get_current_tick < 20625) || (get_current_tick() > 24375 && get_current_tick < 25625) || (get_current_tick() > 29375)) && (get_flag(210,1) < 1)) { place_out_spec_enc(0,25,30); place_out_spec_enc(1,20,25); place_out_spec_enc(2,18,33); set_flag(210,1,1); } break;beginstate START_STATE;//if it's night and you've killed them off, they come back if (((get_current_tick() < 625) || (get_current_tick() > 4375 && get_current_tick < 5625) || (get_current_tick() > 9375 && get_current_tick < 10625) || (get_current_tick() > 14375 && get_current_tick < 15625) || (get_current_tick() > 19375 && get_current_tick < 20625) || (get_current_tick() > 24375 && get_current_tick < 25625) || (get_current_tick() > 29375)) && (get_flag(210,1) < 1)) { set_flag(210,0,0); place_out_spec_enc(0,25,30); place_out_spec_enc(1,20,25); place_out_spec_enc(2,18,33); set_flag(210,1,1); }//if night ends in the section, the monsters all disappear if ((get_current_tick() > 624 && get_current_tick() < 635) || (get_current_tick() > 5624 && get_current_tick() < 5635) || (get_current_tick() > 10624 && get_current_tick() < 10635) || (get_current_tick() > 15624 && get_current_tick() < 15635) || (get_current_tick() > 20624 && get_current_tick() < 20635) || (get_current_tick() > 25624 && get_current_tick() < 25635)) eliminate_outdoor_enc(210,0); break;beginstate 10;//finds out if the encounters have been encountered or not//also facilitates re-appearance of monsters if (get_flag(210,2) < 2) inc_flag(210,2,1); else { set_flag(210,1,0); set_flag(210,2,0); } break; Link to comment Share on other sites More sharing options...
Seasoned Roamer Old MikeS Posted September 4, 2005 Share Posted September 4, 2005 For (1) - I've used this (CV has something like it also - this is from what I've currently been working on): Code: beginstate 13; // balance the monsters on this level to party (max) level // x = dungeon level // do this one time only (first time entering a level/regenerating a level)... set_flag(x, 27, 1); // get max party level i = 0; lvl = 0; while (i < 4) { if (char_ok(i) == TRUE) { e = get_level(i); if (e > lvl) { lvl = e; } } i = i + 1; } // check max level monster levels in dungeon... i = bg; while (i < en) { if (char_ok(i) == TRUE) { e = get_level(i); if (lvl > e) { tt = lvl - e; // monster level = cur lvl + 0..delta + [1-9] mlvl = e + get_ran(1, 0, tt) + x; if (mlvl <= 100) set_level(i, mlvl); else set_level(i, 100); } } i = i + 1; }break; In the above, bg and en are the monster number ranges set elsewhere prior to state 13 being called. The code above tries to set all monsters to parties level + some. I've been thinking of a different formula for this because the current one really makes the monsters extemely tough (almost unbeatable). Of course the above doesn't change the monster level if the level is greater than the parties level. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 4, 2005 Share Posted September 4, 2005 Increasing a monster's level does more for it in terms of difficulty than a PC gaining a level. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 4, 2005 Author Share Posted September 4, 2005 Also, What's the best way to split up the party, and them reunite them later (as in A3 when you were put in hte Vahnatai dungeons, and a portal appeared that only 1 of you could go through) - Archmagus Micael Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted September 4, 2005 Share Posted September 4, 2005 Look up the try_to_split_party() call in the docs. Be sure to read the warnings. Link to comment Share on other sites More sharing options...
Kyshakk Koan Bender Bending Rodriguez Posted September 4, 2005 Share Posted September 4, 2005 Quote: Originally written by Archmagus Michael:What's the best way to split up the party, and them reunite them later (as in A3 when you were put in hte Vahnatai dungeons, and a portal appeared that only 1 of you could go through) Actually that was in A2. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 4, 2005 Author Share Posted September 4, 2005 I know this must seem stupid, but I've edited Drakefyre's script, and I think it should work. But it's not. I know I'm missing something, but as I said earlier, I'm hopeless at this type of scripting. Here's the script: Code: beginstate INIT_STATE;// CAVE ENTRY SCRIPT:if (((get_current_tick() < 625) || (get_current_tick() > 4375 && get_current_tick < 5625) || (get_current_tick() > 9375 && get_current_tick < 10625) || (get_current_tick() > 14375 && get_current_tick < 15625) || (get_current_tick() > 19375 && get_current_tick < 20625) || (get_current_tick() > 24375 && get_current_tick < 25625) || (get_current_tick() > 29375)) && (get_flag(210,1) < 1)) { //place_out_spec_enc(0,25,30);//place_out_spec_enc(1,20,25);//place_out_spec_enc(2,18,33);set_flag(3,0,1);set_flag(210,1,1); }break;beginstate START_STATE;//CAVE ENTRY SCRIPT:if (((get_current_tick() < 625) || (get_current_tick() > 4375 && get_current_tick < 5625) || (get_current_tick() > 9375 && get_current_tick < 10625) || (get_current_tick() > 14375 && get_current_tick < 15625) || (get_current_tick() > 19375 && get_current_tick < 20625) || (get_current_tick() > 24375 && get_current_tick < 25625) || (get_current_tick() > 29375)) && (get_flag(210,1) < 1)) { set_flag(210,0,0); set_flag(3,0,1);//place_out_spec_enc(0,25,30); //place_out_spec_enc(1,20,25); //place_out_spec_enc(2,18,33); set_flag(210,1,1); }//end nightif ((get_current_tick() > 624 && get_current_tick() < 635) || (get_current_tick() > 5624 && get_current_tick() < 5635) || (get_current_tick() > 10624 && get_current_tick() < 10635) || (get_current_tick() > 15624 && get_current_tick() < 15635) || (get_current_tick() > 20624 && get_current_tick() < 20635) || (get_current_tick() > 25624 && get_current_tick() < 25635)) eliminate_outdoor_enc(210,0); set_flag(3,0,0);break;beginstate 10; //CAVE ENTRY SCRIPT:if (get_flag(210,2) < 2)inc_flag(210,2,1); else {set_flag(210,1,0);set_flag(210,2,0); }break; If I understand it correctly, it should set SDF 3,0 to 1 at night time, and back to 0 in the day. I've set the Variable Town entry to 3,0, so when 3,0 = 0 it should enter town 3, and when SDF 3,0 = 1 it should enter town 4. This is right - right? Please help... - Archmagus Micael Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted September 4, 2005 Share Posted September 4, 2005 I would recommend using Alint in situations like these; with its help I noted the fact that the second get_current_tick() call in each line of the first two conditionals is missing its (). Put those in, and it should work a bit better. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 5, 2005 Author Share Posted September 5, 2005 Quote: Originally written by Niemand:I would recommend using Alint in situations like these; with its help I noted the fact that the second get_current_tick() call in each line of the first two conditionals is missing its (). Put those in, and it should work a bit better. Hmm. Now it's always going to the town which your only meant to enter at night. Could the fact that I haven't put Town Scripts in yet have messed up the Variable Town Entry? - Archmagus Micael Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 5, 2005 Share Posted September 5, 2005 It's because your end night section is screwed up. Use curly braces or eliminate the line "eliminate_outdoor_enc(210,0);" If that doesn't work, edit the if conditional to be all of daytime, not just those 12 ticks. Since you have a town, if you enter the town at night and come back out in daytime, the town will still be visible. Also, you don't need state 10 - that was only because I had three outdoor encounters that this controlled. You also don't need the line "set_flag(210,0,0);" Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 5, 2005 Author Share Posted September 5, 2005 Okay. I'll try that! MikeS, I tried using your script, but I got trounced, so I had given up on it. That was until I had to make a trap for my town, which blasts you at 7 * LEVEL, so I spent about 4 hours getting all of that working really nicely. The end result was, I managed to make a much simpler script to make the monsters at party_level, or higher. I thought that you might want to know this, as this one's much easier to edit the levels, so here it is (add this to basicnpc to work): Quote: If that doesn't work, edit the if conditional to be all of daytime, not just those 12 ticks. Since you have a town, if you enter the town at night and come back out in daytime, the town will still be visible. Which one? How? - Archmagus Micael Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted September 5, 2005 Share Posted September 5, 2005 What Drakefyre means about using all of day time is that your script as it is will only switch from night to day mode if the party is outdoors during the first twelve ticks of the morning. So if the party enters the outdoor section during the night at say 600, the night mode will be activated, but if the party then enters a town during the night, like at 610, and stays in the town until 640, when they exit that town, the town entry script will remain in night mode. What he suggests that you do is changes the time ranges on the end night code to be more like 624 - 4376 , 5624 - 9376 , etc. Also, you might add a short check to each of the conditionals so that it will not repeat itself if its effect is already in force. The first check in the first conditional would be (get_flag(3,0) == 0) since if this is false the flag is already 1 and there is no need to set it again. Link to comment Share on other sites More sharing options...
Unflappable Drayk John S Posted September 5, 2005 Share Posted September 5, 2005 Upon deep consideration of myself and the world at large, I've come to the conclusion that my post was extremely similar to Archmagi Micael's and so have selflessly removed the greater part of it. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 5, 2005 Author Share Posted September 5, 2005 Now it's stuck on DAYCAVE! I'm doomed Someone please help (again)... Here's my code: (What could possible be wrong with it now?) Code: //Outdoor script for ETS (The Emerald Tortoise Scale)//By Archmagus Micael]//Cave Entry Script provided by Drakefyre, with modificationbeginoutdoorscript;variables;body;beginstate INIT_STATE; // CAVE ENTRY SCRIPT: if (((get_current_tick() < 625) || (get_current_tick() > 4375 && get_current_tick() < 5625) || (get_current_tick() > 9375 && get_current_tick() < 10625) || (get_current_tick() > 14375 && get_current_tick() < 15625) || (get_current_tick() > 19375 && get_current_tick() < 20625) || (get_current_tick() > 24375 && get_current_tick() < 25625) || (get_current_tick() > 29375)) && (get_flag(210,1) < 1)) { set_flag(3,0,1);set_flag(210,1,1); }break;beginstate START_STATE;//CAVE ENTRY SCRIPT:if (((get_current_tick() < 625) || (get_current_tick() > 4375 && get_current_tick() < 5625) || (get_current_tick() > 9375 && get_current_tick() < 10625) ||(get_current_tick() > 14375 && get_current_tick() < 15625) || (get_current_tick() > 19375 && get_current_tick() < 20625) || (get_current_tick() > 24375 && get_current_tick() < 25625) || (get_current_tick() > 29375)) && (get_flag(210,1) < 1)) { set_flag(3,0,1);set_flag(210,1,1); }//end nightif ((get_current_tick() > 624 && get_current_tick() < 4376) || (get_current_tick() > 5624 && get_current_tick() < 9376) || (get_current_tick() > 10624 && get_current_tick() < 14376) || (get_current_tick() > 15624 && get_current_tick() < 19376) || (get_current_tick() > 20624 && get_current_tick() < 24376) || (get_current_tick() > 25624 && get_current_tick() < 29376)) set_flag(3,0,0);break; - Archmagus Micael Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 5, 2005 Share Posted September 5, 2005 You need to set flag 210,1 to 0 when it turns to daytime (put it right next to set_flag(3,0,0) and enclose them both in curly braces. EDIT: Disabled graemlins. Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 5, 2005 Author Share Posted September 5, 2005 It WORKS! (just the wrong way round, but I can fix that!) THANKS DRAKEFYRE! EDIT: And now it's stopped working. This is annoying! How in the world does it keep messing up like this? - Archmagus Micael Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 5, 2005 Share Posted September 5, 2005 No problem. This was one of my favorite things in my scenario, and I'm glad that someone can use it in a scenario that will (hopefully) be released. EDIT: For efficiency, it would be advisable to put the checks for 210,1 as the first condition in the each if statement rather than the last. EDIT 2: And for more efficiency, just take out the 210,1 altogether and just replace it with 3,0 Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 5, 2005 Author Share Posted September 5, 2005 And it works again. I didn't see your latest post! THANKS AGAIN! EDIT: Quote: No problem. This was one of my favorite things in my scenario, and I'm glad that someone can use it in a scenario that will (hopefully) be released. I plan to release it before October at least. I think I can finish it in a week or two, if I don't run into any major snags. But I'll say a month just to be on the safe side. - Archmagus Micael Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 5, 2005 Share Posted September 5, 2005 Are you making this scenario for the Pearl contest? Link to comment Share on other sites More sharing options...
Well-Actually War Trall Archmagus Micael Posted September 7, 2005 Author Share Posted September 7, 2005 Quote: Originally written by Drakefyre:Are you making this scenario for the Pearl contest? The What contest? What's that? - Archmagus Micael Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted September 7, 2005 Share Posted September 7, 2005 http://p080.ezboard.com/fthelyceumfrm2.showMessage?topicID=476.topic Probably not, then. Link to comment Share on other sites More sharing options...
Recommended Posts