Jump to content


Photo

That 326 effect, Apply Effects List


  • Please log in to reply
26 replies to this topic

#21 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 21 February 2018 - 09:14 AM

 Am I missing something
No, you've got it.
 
If you're going to patch AI scripts, then using specifics makes sense, since you'll have some degree of control anyway. Do note that it's kinda unpleasant monkey work though, since you deal with a bunch of random scripts instead of centralized system (which is how AI must be... not in IE, apparently <_<).

PS Who on earth thought this piece of shitware was a good choice as forum engine? > :(

Edited by GeN1e, 21 February 2018 - 09:16 AM.

Retired from modding.


#22 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 21 February 2018 - 09:26 AM

Pretty sure that if the AI scripts were not decentralized they would attain self-awareness and become Skynet. So I guess we can thank Bioware's pain-in-the-ass scripting implementation for averting the robot apocalypse.




.....this time.

#23 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 21 February 2018 - 09:59 AM

If you're going to patch AI scripts, then using specifics makes sense, since you'll have some degree of control anyway.
No-no-no, nothing that drastic, I just need a way to tell PC simulacrums to attack exactly same creature whose original attack by real PC caused them to appear (I hope that makes sense) :)

P.S. temnix do let me know if you want posts starting from #19 to be moved off your topic.

Edited by Creepin, 21 February 2018 - 10:40 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#24 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 21 February 2018 - 11:19 AM

Pretty sure that if the AI scripts were not decentralized they would attain self-awareness and become Skynet. So I guess we can thank Bioware's pain-in-the-ass scripting implementation for averting the robot apocalypse.

Most other games use semi-hardcoded AI, controllable by flags. This actually is what I tried to simulate in SoD - BDSHOUT is shared by almost all actors who are not random wilderness encounters, and behavioral control variables are set/updated in their override scripts.

 

If you're going to patch AI scripts, then using specifics makes sense, since you'll have some degree of control anyway.
No-no-no, nothing that drastic, I just need a way to tell PC simulacrums to attack exactly same creature whose original attack by real PC caused them to appear (I hope that makes sense) :)

In that case you might actually wanna ask Temnix, as iirc he's been actively exploring the possibilities of LastSummonerOf()-based controls.


Retired from modding.


#25 temnix

temnix
  • Member
  • 983 posts

Posted 21 February 2018 - 12:40 PM

Let people talk.

 

Creeping, you can get them to attack LastSummonerOf("booba"), where "booba" is the script name of an invisible minion you make the target summon.



#26 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 21 February 2018 - 12:55 PM

Creeping, you can get them to attack LastSummonerOf("booba"), where "booba" is the script name of an invisible minion you make the target summon.

Wait a second, you can use LastSummonerOf for something other than Myself? Wow never thought of that. So you're saying instead of using #77 on target creature I should use #67 on it to summon Booba? Sounds great, but who will be registered as last summoner of Booba: creature attacked with #67 or PC who performed the attack? I mean I could use ActionOverride on that creature instead of #67 to be absolutely sure he will be considered LastSummonerOf, but that would interrupt creature's combat script so this implementation is not perfect.


Edited by Creepin, 21 February 2018 - 01:04 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#27 temnix

temnix
  • Member
  • 983 posts

Posted 21 February 2018 - 02:35 PM

You can have LastSummonerOf anyone, even dead people. And you can use TriggerOverride/ActionOverride(LastSummonerOf("booba"),TRIGGER/ACTION) to get a minion's master from the script of another creature or an engine script. Giving away a bit of proprietary research here, but what the heck... The summoner of the creature is the target of 67. If you want the simulacra to attack the creature the blow on which a PC had landed, you don't need a script reference to the PC. You make two types of effects for the special attack - a batch of Project Image effects to create your simulacra, these will be targeted at Self, and another, a 67 with the enemy as the target. Pass the 67 through Use EFF File always to block the giveaway puff of smoke (type "shskull" in Resource 2, it's a dud visual). The minion only needs to have a script name for your simulacra to latch on to. To keep minions from hanging around after work, I equip all of mine with a self-destruct mechanism - a Self-targeted delayed Remove Creature effect. Mine vanish in 5 seconds unless the script removes them earlier. You can create a minion like this as a template, call it +MINION.CRE, and it will float on top of the list in Near Infinity. When you need a servant for something, you just copy this guy.

 

There is a limitation here that the engine perceives only the latest creature with a script name. If you summon another booba, the first one will slip off the hook completely, and there is no way to latch on to it again (same problem as with simulacra, who all have the script name "copy"). Icewind Dale has an action for setting a script name, but the BG series doesn't, which is very big on my wish list, in case some designer is reading this. Script name duplication probably won't be an issue in your case, but what you can put in the scripts of the simulacra instead of a script name is some special definition of the minion, which you can make as exotic as your heart desires. Make the minion, for instance, the BELT General type and add extra details about alignment and so on, if you want. But usually General is enough. There probably won't be too many BELTs hanging around just then. Then you script the simulacra like this:

 

IF

 

Detect([BELT])

 

THEN

 

RESPONSE #1

 

AttackOneRound(LastSummonerOf(LastSeenBy))

 

END


Edited by temnix, 21 February 2018 - 02:44 PM.