Co8 5.0.0 Beta - The Big 3; A poll

Discussion in 'General Modification' started by Kalshane, May 11, 2006.

Remove all ads!
?

I think the encounter should be handled like this...

Poll closed May 24, 2006.
  1. They show up with moathouse brigands

    1 vote(s)
    3.2%
  2. They show up with moathouse brigands only after Lareth is dead

    10 vote(s)
    32.3%
  3. They show up with temple tower troops

    0 vote(s)
    0.0%
  4. They show up with temple tower troops only after Lareth is dead

    9 vote(s)
    29.0%
  5. They show up with Nulb pirates

    0 vote(s)
    0.0%
  6. They show up with Nulb pirates only after Lareth is dead

    0 vote(s)
    0.0%
  7. They show up on thier own

    0 vote(s)
    0.0%
  8. They show up on their own only after Lareth is dead

    4 vote(s)
    12.9%
  9. What the hell is this poll all about?

    7 vote(s)
    22.6%
  1. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Re: 5.0.x Cumulative Mods & Fixes (CMF) Bug Reports and Discussion Thread

    You're right about cur_map and partly about the story_state checks, I just copy-pasted from my own generic_spawner file which is heavily modified for the traders mod thing :) Change cur_map to attachee.map in your file, and as for the story state thing, it's harmless because it checks:
    rather than
    The story state is set to 2 the moment Lareth is killed, and it doesn't matter beyond that point because the story_state variable can only advance, so it's harmless to check if it's greater than or equal to 2. You can safely remove it though.

    And of course, you're welcome :)
     
  2. thearioch

    thearioch Need More Cowbell

    Joined:
    Sep 16, 2007
    Messages:
    178
    Likes Received:
    0
    999.
    Not 1000.
    Not 1023 or 1024.
    If they were going to use arbitrary numbers, they could have at least used de minimis imagination and chosen 666 as a limit.
    Cheap hacks.
    And I don't mean *hackers* -- that would be a compliment.

    --thearioch
     
  3. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    If I understood them rightly, Cerulean's concerns were with how many flags etc were being stored in memory, or some such thing: too many would cause a crash, he thought.

    I guess as the years go by and everyone's gear gets better with more RAM, it becomes less of an issue :shrug: Hard to tell if any given crash is caused by that, anyway. But folks are still getting through to the end without it beoming unplayable.

    Speaking of C-Blue, I staggered onto the first page of this thread by mistake... :flamed:
     
  4. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Re: 5.0.x Cumulative Mods & Fixes (CMF) Bug Reports and Discussion Thread

    OKAY ... of course I've got all sorts of problems with this again. :blegh:

    Firstly, the testing conditions: as long as I'm not violating any rules I already identified (like the 'don't put similarly worded py files in the scr folder or the scripts won't compile' rule, which I spent another 3 hours agonizing over again today until I figured it out a second time), I've got 3 saves that work with the last py00334generic_spawner I published - one for the cave exit, one for the courtyard, and one for the back door. And I confirmed Sitra's attachee.destroy() problem. If you exit the Moathouse to any of those three areas before killing Lareth, then re-enter, kill Lareth, and re-exit, the ambush won't fire. This is probably why we've seen these mysterious "I still don't get the ambush!" reports.

    Now the new problems: (cur_map == xxxx) is a deal-breaker for me. The moment I add that to an otherwise working script, the ambush is no-go. Likewise for the script modification of separating the 283 flag check as the last 'if' condition independantly and adding the 'else' condition for attachee.destroy(). That renders the ambush inoperable in my otherwise working saves.

    Now the new proposed solution: I tested the original scripts with attachee.destroy() simply removed from the code, and everything works. The ambush does not repeat itself or anything like that. So ... being as I never really understood what attachee.destroy() did before anyway, is it absolutely neccesary to the script? If not, apparently removing it alone would solve the leave-come back-leave problem.

    [edit]

    I see one problem with this already - if you exit into the courtyard and the bandits are there, the script apparently repeats itself. As soon as there are no bandits around, the Big 3 appear out of thin air. This is kind of cool in a way actually (although it would be better if they walked in), but unfortunately they fight with the remaining bandits (those further out from the door).

    [another edit]

    Okay, a suitable workaround seems to be to move the attachee.destroy() command to correspond to the ambush command, as opposed to the last set of 'if' conditions. Doing so makes the ambush occur if you leave-come back-leave as described above, and it takes care of the courtyard bandits problem too. Presumably, the script does not self destruct until the ambush actually occurs.

    The code looks like this:

    Code:
    	if (attachee.map == 5091):	# Moathouse Cave Exit
    		game.areas[8] = 1
    		if not (is_follower(8002) or is_follower(8004) or is_follower(8005) or is_follower(8010) or game.party_alignment == LAWFUL_EVIL):
    			if ((game.global_flags[44] != 1) and (game.global_flags[45] != 1) and (game.global_flags[700] != 1) and (game.global_flags[37] == 1) and (game.global_flags[283] == 0)):
    				Big_Three_Ambush_1(attachee)
    				attachee.destroy()
    
    	if (attachee.map == 5002):	# Moathouse Courtyard & Back Door
            	for leader in game.party:
                		xx, yy = location_to_axis(leader.location)
                		if (xx == 462) and (yy == 447):		# Courtyard
                   			banditcheck = find_npc_near(attachee,14070)
                    		if (banditcheck == OBJ_HANDLE_NULL):
                        			if not (is_follower(8002) or is_follower(8004) or is_follower(8005) or is_follower(8010) or game.party_alignment == LAWFUL_EVIL):
                            			if ((game.global_flags[44] != 1) and (game.global_flags[45] != 1) and (game.global_flags[700] != 1) and (game.global_flags[37] == 1) and (game.global_flags[283] == 0)):
                                				Big_Three_Ambush_2(attachee)
    							attachee.destroy()
                		elif (xx == 437) and (yy == 445):	# Back Door
                    		if not (is_follower(8002) or is_follower(8004) or is_follower(8005) or is_follower(8010) or game.party_alignment == LAWFUL_EVIL):
                        			if ((game.global_flags[44] != 1) and (game.global_flags[45] != 1) and (game.global_flags[700] != 1) and (game.global_flags[37] == 1) and (game.global_flags[283] == 0)):
                            			Big_Three_Ambush_3(attachee)
    						attachee.destroy()
     
    Last edited: Jul 26, 2008
  5. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    Re: 5.0.x Cumulative Mods & Fixes (CMF) Bug Reports and Discussion Thread

    Without studying anything in detail, I shall randomly throw out solutions :wave:

    I have never heard of cur_map, I think it is something Sitra made up to make life easier in his scripts, so if you are not importing his scipts it won't work. Stick to attachee.map like he said and it should be fine.

    Attachee.destroy in this case destroys the spawner so it can never set another big 3 ambush again. It probably does nothing because before it fires it checks for a bunch of flags that presumably change during the course of the big 3 spawning firing. I would leave it there as a cleanup, to be thorough.

    EDIT: Ahhh, its breaking the script. Hmmm... then there must be more conditional things in the Big_Three_Ambush_1(attachee) part since it is still deciding whether or not to fire in there? Put it at the end of each of the 3 ambush scripts intead then, after they have definitely fired.

    This sounds like a lot of hassle but it should be bullet-proof when you are finished :thumbsup:
     
    Last edited: Jul 27, 2008
  6. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Forgot to mention - this has been re-added to the CMf, in the form I posted above. We'll see if it works properly in wider circulation.
     
Our Host!