Jump to content

Xyx

Members
  • Content Count

    26
  • Joined

  • Last visited

About Xyx

  1. I'll take your word for it (since I wouldn't want my targets reevaluated anyway)... but I was under the impression that we just established that Attack() already did something of the sort, in which case the difference would be academic at best.
  2. I get that they're technically not the same... but what is the noticeable difference? OK, that's interesting. That would explain some of this mess. If you are referring to the STATE_DISABLED example in my comments... I could get other states (compound or otherwise) to work, but not this one, even if my "targeting" was just See(NearestEnemyOf()). How does this interact with the "object ids are reevaluated every turn" that Avenger mentioned? ...except that, in many cases, no interruption happens even if ActionListEmpty() isn't used anywhere. I scripted a bunch of summoned critters (Nishruu, Efreeti, Planetar, etcetera) to cast one of their spells every 6 seconds and attack in between. They all use the same principle; a 6-second timer that forbids spellcasting while it runs, with an Attack() order at the end of the script. Some of them worked fine, others got hung up on attacking. I then switched to AttackOneRound(), and they all worked fine. I then added ActionListEmpty() to keep them from interrupting manual player commands, and some of them got hung up on attacking again. I now use a mixture, with some of them checking ActionListEmpty() in every block and others only in the block containing the attack order. This means that some of them are properly obedient, and others can be a bit unruly (they will occasionally abort the player's orders).
  3. I always use DisplayStringHead() when debugging to see which response gets executed. What do you use the hotkeys for? I've seen scripts attack and kill different targets over the course of several turns and still refuse to cast a spell in between. I'm not concerned about target fixation (there's usually little need for a party member to stop attacking a certain monster before it is dead), but I do need my summoned critters to use all their spells in between attacks.
  4. Ah, yes, a copy/paste error. I tried both. sorry for the confusion. Attack() may still be interrupted. It's just more likely to get stuck. I could find no difference between Attack() and AttackReevaluate(somevalue), but that is no proof that there is no difference. The problem with these things is that everyone seems to have different results because of varying circumstances. In my experience, whether or not a script gets stuck seems to depend entirely on the script and its circumstances, not on random chance.
  5. yes it does Indeed, my mistake. I assumed it was HasItemSlot("MELFMET",SLOT_MISC0) instead of HasItemSlot(Myself,SLOT_MISC0), so naturally I couldn't get it to produce any results. I'll edit the original post. I ran a few more tests and now even AttackOneRound() seems buggy at times. Specifically, consider the following script: // Cure Light Wounds IF ActionListEmpty() // Can cast? !GlobalTimerNotExpired("XyxAlacrityTimer","LOCALS") THEN RESPONSE #100 DisplayStringHead(Myself,6620) // "Cure Light Wounds" SetGlobalTimer("XyxAlacrityTimer","LOCALS",6) SpellNoDec(Myself,CLERIC_CURE_LIGHT_WOUNDS) END IF ActionListEmpty() See(NearestEnemyOf()) THEN RESPONSE #100 DisplayStringHead(Myself,4666) // "Attack" Attack(NearestEnemyOf()) END It's supposed to cast Cure Light Wounds every six seconds and attack in between. As it is, it'll cast Cure Light Wounds exactly once and then get hung up on attacking. It may even switch to another enemy if the original target dies without ever casting Cure Light Wounds again. However, remove the ActionListEmpty() triggers or change NearestEnemyOf() to Player1 and suddenly it casts Cure Light Wounds every round like clockwork.
  6. Here is my personal documentation, most of which is not covered in the IESDP: // ---------------------------------------------------------------------------- // Documentation. // // Reliability of script execution: // - Script may occasionally execute when !ActionListEmpty(). // - Confirmed to happen during long move orders. // - Attack() can get hung up. // - Not confirmed whether the script even runs at all until the target is // dead. // - AttackReevaluate() seems equivalent to Attack(). // - The duration seems to be ignored. // - AttackOneRound() reports ActionListEmpty() every run. // // ActionListEmpty(): // - Not reported during long move orders. // - Not reported while looting containers. // // LastSeenBy(): // - Set by See() and Detect(), not by Exists() or Range(). // // Invisible creatures: // - See(), Detect(), Exists() and Range() all detect visible creatures in // sight radius only, with the following exceptions: // - Detect() will detect an invisible Myself, Player1 or [EVILCUTOFF], but // not NearestEnemyOf(). // - Exists() and Range() will detect an invisible Myself or Player1, and // will detect them out of sight radius. They will still not detect // invisible enemies or visible enemies out of sight radius. // - Note that even See(Myself) only works if you're not invisible. // // Communication: // - Shout() carries throughout the area. // - Help() carries slightly further than sight radius, probably range 40. // - Help() sticks around for 7-12 seconds. // // Continue(): // - Use of Continue() anywhere will cause subsequent empty RESPONSE blocks to // be treated as if they, too, had Continue(). // - Use NoAction() to stop. // - Continue() appears to cause all instances of LastSeenBy() to be set to the // last value set in the current script run. // // NoAction(): // - NoAction() is, apparently, not actually equivalent to no action. See // Continue(): // - NoAction() will not cancel modal actions. Use ClearActions() for that. // Use PlayerDialogue(Myself) to un-hide immediately. // // Update speed: // - LastSeenBy() is set in the current script run, but if Continue() is used, // it will always evaluate to the last value that gets set in the run. // - The values of SetGlobal() and SetGlobalTimer() are set in between script // runs. // - Help() is set in between script runs. // - Heard() is set in between script runs? // - Wait() and SmallWait() do not allow the script to update in the meantime. // // DRUID_ALL: // - It is not worth checking for enemy Druids. There are only a few of them, // and those come in groups. // // Range(): // - You can't get closer than range 8 to huge creatures like dragons. // - Range 4 is melee range. // - Anyone using a ranged weapon at this range suffers -8 to hit. // - Anyone attacking someone using a ranged weapon in melee gains +4 to hit // and damage. // // Melf's Minute Meteors: // - These count as ranged weapons, so they suffer -8 to hit at point blank and // hand out +4 to hit and damage to opponents in melee. They cannot be put // away. // - HasItem("MELFMET",Myself) works. HasItemEquiped(), HasItemEquipedReal() // and HasItemSlot() (whichever slot) do not work (for Melf's Minute Meteors, at least.) // // SelectWeaponAbility(SLOT_WEAPON0,1): // - Haven't seen this produce any results. // // Controlled undead detection: // See([ALLY.UNDEAD]) // Summoned only. // See([CONTROLLED.UNDEAD]) // Controlled only. // See([CHARMED.UNDEAD]) // Nothing. // See([GOODBUTRED.UNDEAD]) // Nothing. // See([GOODCUTOFF.UNDEAD]) // Controlled and summoned. // See([NOTGOOD.UNDEAD]) // Unturned only. // See([NOTEVIL.UNDEAD]) // Controlled and summoned. // See([EVILCUTOFF.UNDEAD]) // Unturned only. // See([EVILBUTGREEN.UNDEAD]) // Nothing. // See([ENEMY.UNDEAD]) // Unturned only. // // Containers (Bag of Holding, Potion Case, etcetera): // - HasItem() works for stuff inside a container. // - GiveItem() works for stuff inside a container. // - UseItem() does NOT work for stuff inside a container. // - To use an item in a container, give it to yourself first. // // OutOfAmmo(): // - Always returns True, even with arrows in all three slots. // // InPartySlot(): // - Player1 is in slot 0, Player2 in slot 1, and so on. // - NOT to be confused with marching order. // // Compound states: // - State values are bit flags and can be added together to check many states // in one StateCheck(). // - To calculate the compound state value, simply add them together and make // sure the result is decimal, not octal. // - Compound states allow for !StateCheck(<many different states>) in an OR(). // - The following works: // StateCheck(Myself,4194320) // Untargetable (STATE_INVISIBLE + STATE_IMPROVEDINVISIBILITY) // - The following (found on the web) does not work: // StateCheck(LastSeenBy(),2148540461) // Compound "disabled" state // // Hide() // - Hiding does not necessarily break long move orders. // // EquipItem() // - Perhaps it would move an item to an appropriate slot, but it will not // switch weapons. // // Timers: // - Names cannot be longer than 32 characters. // // STATE_PANIC: // - This state seems to apply only to creatures that are affected by panic // inducing magic. Creatures that fail their Morale check are not in this // state. // ---------------------------------------------------------------------------- All of this is the result of actual findings, verified where possible. Hope it helps! EDIT: Removed HasItemSlot() comments and added disclaimer for Melf's Minute Meteors stuff.
  7. Right... it should be SetDialogue(""), not SetDialogue("",Myself). I'd edit my first post and the topic title if I could.
  8. No, but it does offer this one. You can press F1 and then click on yourself and it'll immediately make you visible. You can also open a container or click on an item on the ground. This is undoubtedly blasphemous, but I have never heard of either. What are the odds of anyone wanting to use my script with those?
  9. I'm a bit of a purist and I wouldn't want my script to do anything that the player (or one of the default scripts) couldn't also order the character to do. Well, that's the funny thing... I did actually kick someone out after that and it still seemed to work fine. Maybe the game resets the dialogue when someone gets kicked out. Wouldn't that be necessary anyway, considering other parts of the game can call SetDialogue() as well?
  10. I wrote a script that has Thieves automatically Hide In Shadows when the player turns on stealth mode (with a hotkey.) Because hidden characters cannot be healed and leaving the shadows can take such a long time, I have the Thief initiate dialogue with himself (PlayerDialog(Myself)) when stealth mode is turned off. This instantly reveals him. This works fine for the main character and for the NPCs that I tried it on. You get a little red "<GABBER>- has nothing to say to you" line in the text area, but that's not a big deal. However, if you start a multiplayer game and make more than one custom character, the not-Player1 character will actually initiate dialogue and say "Why do you waste my time with idle banter?", complete with pausing the game and forcing you to click End Dialogue. It would appear that the not-Player1 characters have MULTIG.DLG assigned, which handles being kicked out of the party. I can SetDialogue("",Myself) before initiating dialogue. This seems to work fine. However, I'm afraid it'll mess something up that I don't know about... break the game somehow. I'm not familiar with how the game handles dialogues. Is there any danger in doing this?
  11. Thank you for the clarification. I'll just stick with the WAVs. Turns out it's only a 500kb difference, and it's not like it has to fit on a floppy disk.
  12. Yes. The compressed WAVs only work in Near Infinity, but the regular WAVs work everywhere. Wait... I can distribute uncompressed WAVs to anyone? I don't think that's what she said.
  13. I saved the sound clips as 16-bit mono WAVs, and that worked fine. I then had PS gui convert them and I tested them in Near Infinity, and they still seemed fine. Then I tried them in-game a bunch of times, and it seemed that the selection sounds were silent, while the action acknowledgements crashed the game. For me personally there's no real issue. The soundset takes up 1mb instead of 0.5mb, but who cares. If I understand berelinde correctly, I can't currently distribute this to anyone on a non-Windows OS. Is that a large part of the community?
  14. OK, it was a stupid question. Sorry 'bout that, appreciate your help. So... I used PS gui to convert all the sounds to .wavc format (but with .wav extension) and then copied them to the sounds folder. Now they're either inaudible or they make the game crash. Good thing I still have the originals. Anyone have any hints?
  15. This is probably a stupid question... but what is PS_Gui and where do I get it? Google won't tell me anything useful. It sounds like a good thing, though.
×
×
  • Create New...