Prompt combat eariler for ranged characters?

Discussion in 'Modding and Scripting Support' started by thelonetaco, May 5, 2006.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. thelonetaco

    thelonetaco New Member

    Messages:
    12
    Likes Received:
    0
    Joined:
    May 5, 2006
    Has anyone successfully (or it is possible) to cause turned based combat to start as soon as a nearby NPC/creature turns hostile, rather than as soon as it touches the PC? This change would be a boon for ranged characters. As it stands, I think you just have to be quick with the spacebar. I don't even both playing ranged characters because of this "feature." Any ideas? Thanks!

    -Matt
     
  2. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    No, it hasn't been done.
    Here is a suggestion off the top of my head. You may have to play around with it to make it work.

    Attach a heartbeat script to the player.

    LOOP for everyone in vicinity
    reaction of npc (obj) to pc (obj): store in (num)
    IF (num) <= 0
    THEN combat: (Player) attacks (current looped object)
    END LOOP

    To attach a heartbeat script to the player you must have an object or critter which attaches the script to the player using:
    change script attached to (obj) at point (num) to script (num)

    This may or may not be reset during the game. I've only used player beats in my stand alone mod.
     
  3. thelonetaco

    thelonetaco New Member

    Messages:
    12
    Likes Received:
    0
    Joined:
    May 5, 2006
    Thanks for your response. This is suddenly way above my head :^) I'm searching through WorldEd documentation, but I'm not sure what file to even add the script to.

    Also, it appears that I would need to add this script for every location for every creature. Is this accurate?

    I really need more of a walkthrough, I'm a complete newbie to Arcanum modding :^(

    -Matt
     
  4. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    It's nice to see some people in this forum for a change. I live in hope that the more people who try modding, the greater the chance that someone will be able to answer my questions. So really I'm only answering your questions for purely selfish reasons.
    Muahahahah...cough...

    Read Amtut first. Then progress to WorldEd manual. Read the whole manual.
    Look at existing scripts. If you can steal a solution from Troika, save yourself a headache and do so.

    No. The script would be attached to the player (or a follower who is guaranteed to be with the player).
    Any critter who is on screen would be in the "vicinity" and so would be scanned by the loop which is being performed by the player.

    I'm afraid a walkthrough of this problem might not be that useful at this stage. You have posed a difficult problem. I suggest you start off with some easier things and then come back to this when you are confident with sockmonkey.
     
  5. thelonetaco

    thelonetaco New Member

    Messages:
    12
    Likes Received:
    0
    Joined:
    May 5, 2006
    A problem I'm having with sock monkey is that it doesn't seem to include all the possible commands - most importantly not the reaction condition potentially necessary to fire combat!

    Something I've come across is the "ENTER COMBAT" attachment. The WorldED manual says this is a check, but is this accurate? Could I someone use it as an action? Or, is the only way to start combat to use the "combat: obj to obj" action?

    Also, how do I know my script is even being read by the game? Do I just put it in the data/scr folder?

    -Matt
     
  6. thelonetaco

    thelonetaco New Member

    Messages:
    12
    Likes Received:
    0
    Joined:
    May 5, 2006
    Ok, I've been going through Troika scripts and I've read all the (what I think is) relevant stuff in AMTUT and the WorldEd manual. Still confused :^)

    A big problem I'm having is that I can't find a script that starts combat. Most of the Troika scripts that I know should involve combat (e.g., pissing off Bates) first send you to dialogue, which then sends you to combat. If I recall correctly, combat from dialogue can occur when people are distant (i.e., not touching).

    So...that gives me nothing.

    Something else that is confusing is the use of "script attachments." The WorldEd manual has a list of ~50 but never explains how to use them. As they are just numbers, it is difficult to peruse through the Troika scripts to find their use.

    If you are interested in helping me figure this one out, could we meet up on an instant messenger service? While it seems like a complicated problem, there do seem to be enough conditions/actions to get it to work. I just don't know the Arcanum modding language well enough :^( Thanks for your help so far :^)

    -Matt
     
  7. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    Not everything has an associated script. Most of the basic things are handled directly by the game engine.

    This is done in the dialogue file, not in the script.
    "co" in the last bracket will initiate combat.
    {320}{Let's just skip to the part where I loot your corpse. Mmm'K?}{}{1}{}{0}{co}

    This is all covered in the edit docs and WorldEd manual.

    Every item and critter has these attachment points. You attach a script to them in WorldEd. I think AMTUT covers this in detail.

    I advise you read all of these things thoroughly. There really is no substitute for it.
     
  8. thelonetaco

    thelonetaco New Member

    Messages:
    12
    Likes Received:
    0
    Joined:
    May 5, 2006
    Ok, a year later I'm wondering if anyone has put any thought into this. I recently bought Baldur's Gate and found that their combat system is essentially what I would like in Arcanum. Something that came to mind there is just a general SLOWING of combat. In Arcanum, everyone moves so damn fast it is impossible to get your bearings. But even then the real Holy Grail would be to immediately pause the game when one character goes hostile. Any thoughts?
     
  9. Grossenschwamm

    Grossenschwamm Well-Known Member

    Messages:
    7,630
    Likes Received:
    4
    Joined:
    Feb 21, 2006
    What you're describing is the difference between real-time and turn-based combat. I find real-time in Arcanum to be too hectic, and I can't plan anything unless I plan to fight someone later on. In Baldur's Gate, you're completely right;
    The combat is a tad slower than actual gameplay. I'm not sure if that's intentional, though. It could be the game's engine having a few hiccups due to the high amount of blood and flesh chunks on screen (quivering palm is awesome).

    For Arcanum, all that you need to do is go into your options menu and switch from real-time to either turn-based or fast turn-based.
    What'll happen when you make the switch is as soon as you get into combat, everything will freeze and an action-point bar will appear at the bottom of your game window.

    At least, I hope that's what you meant. If you're talking about adding another script to the game to make that happen, there's no need, because the game already does that when you change your combat settings. Though, adding a script to turn the change into a hot-key...
     
  10. thelonetaco

    thelonetaco New Member

    Messages:
    12
    Likes Received:
    0
    Joined:
    May 5, 2006
    The problem lies in WHEN combat is said to start. It SHOULD start (according to me and just about every combat RPG I've ever seen) when someone goes hostile. In Arcanum, it only starts when a hostile character is about to attack the PC. This is totally fine for melee characters, but for ranged characters this makes the game MUCH harder. The extra script would be to cause combat to start when someone goes hostile toward the PC rather than when they touch.
     
  11. Vorak

    Vorak Administrator Staff Member

    Messages:
    5,829
    Likes Received:
    21
    Joined:
    Sep 15, 2003
    Well you can just start the fight yourself.
     
  12. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    Yes, if only it was possible to change combat modes by pressing some sort of bar...in space...a "space bar" if you will. If only such a thing were actually part of the game...if only...

    A heartbeat script which constantly loops to check for hostile creatures in the vicinity of the player would make this possible. The heartbeat would have to be attached to the player. While this is possible I would advise against it.

    I think Vorak has the right idea.
     
  13. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    I have never attached scripts to the player - I probably should have tried, but I guess I figured it wasn't possible. Have you been able to attach scripts to all the attachment points you have tried? I'm about to go try this myself, but let me first say this - the best way to do it is probably not to rely on a "guaranteed" follower, but to assign it to the starting tile (via tile script) of the mod. Or, assign it to the heartbeat of an NPC near any location, where the NPC is turned off, but whose HB will still fire regularly.

    As far as the arcanum mod goes, I don't believe I've seen any scripts attached to the player, but I can't be certain.

    As to starting combat, I don't use turn-based myself, but I'd suggest shift-clicking on enemies at range, and initiating combat yourself. This is a good idea even in real-time combat. That way, you control the battle. You might also tell your followers to attack the enemy (F2?), since most of my ranged PC's are weak to physical combat and don't carry heavy armor.
     
  14. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    For the problem in question this method would require an invisible NPC standing in every sector of the map.

    I don't think there are any.
    I tried it out as a test and it worked but I assume if Troika (apparently) didn't do it then there must be an issue with it.
     
  15. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    if troika intended to do it, I'd expect that they'd add a way to do it, or perhaps mention it in the world manual. However, they were surprised that modders even figured out how to make a world map, so maybe I shouldn't be surprised.

    As to the npc comment, I meant to attach the script, not to check for combat at every sector. However, it was kind of pointless, so i probably shouldn't have even said it.
     
Our Host!