Jump to content


GeN1e's Content

There have been 127 items by GeN1e (Search limited from 29-May 23)


By content type

See this member's


Sort by                Order  

#596701 Position coordinates

Posted by GeN1e on 20 August 2017 - 08:24 AM in IE Help

IIRC the trap spells use some map marker opcode.




#602287 Placing an item on a map

Posted by GeN1e on 06 May 2018 - 12:41 PM in IE Help

You have to create a container (flag as a pile, without vertice and bounding box = 0)

I think I had to add 6x8 size to the pile to make it work. Could be wrong, though.

Easiest way to confirm is to drop something, save, then check what the pile looks in that save.

 

How long is a while? Days, weeks?

A day or a half, iirc.




#596741 PersonalSpaceDistance()

Posted by GeN1e on 23 August 2017 - 12:47 PM in IE Help

Range() has no distance limitations, it's the Nearest()-like and [] object types that don't exist outside of LoS (which is usually 30').




#596748 PersonalSpaceDistance()

Posted by GeN1e on 23 August 2017 - 03:38 PM in IE Help

I would expect it to See() the [] and Nearest() objects at up to 48' range, which is the maximum possible visibility distance (or the cap was changed somewhere in EE, don't remember).




#599470 Out of a Maze? How?

Posted by GeN1e on 11 January 2018 - 02:42 AM in IE Help

Maze effect is actually a combination of imprisonment and delayed freedom. Which means exactly what it does - if you cast freedom spell before maze expires, and then imprison the target for good, the hardcoded effect from maze will still activate and end the new imprisonment.

 

I think 321 should work, though.




#599486 Out of a Maze? How?

Posted by GeN1e on 11 January 2018 - 12:17 PM in IE Help

Cast maze on someone and look at them in the save.




#599490 Out of a Maze? How?

Posted by GeN1e on 11 January 2018 - 01:00 PM in IE Help

Good question... In any case, the only thing I can think about is to use fixed duration (perhaps randomized via percentage probability, perhaps based on reading target's INT via splprot) instead of using intmod table and to 321 it a few seconds in advance. If maze's child effects inherit parent opcode's source string, then it should work.




#595193 On SPRITE_IS_DEAD variables

Posted by GeN1e on 30 May 2017 - 12:52 PM in IE Help

SPRITE_IS_DEADscriptname global is automatically set whenever the creature enters a dead state. It's done on engine level and is not affected by scripting.

Dead("scriptname") is essentially a shorthand for !Global("SPRITE_IS_DEADscriptname","global",0). You can tweak and adjust the death counter manually via SetGlobal() like any other variable, if you so wish, just be careful to understand what you're doing and why, as far as various plot conditions go.

Die() has nothing to do with either, it just marks that the active creature (read - myself) has died in the last round. It can be used to set custom counters as well, in addition to SPRITE_IS_DEAD, even reducing SPRITE_IS_DEADscriptname by 1 to mitigate the effect of hardcoded function. SoD relies quite heavily on Die()-based custom death counters to control the reinforcement spawns in siege battles - while I'm slightly reluctant (or just prejudiced?) to trust it for plot-critical events, I don't recall seeing any cases of Die() not triggering properly during many dozens of hours of testing.

 

"Note that SPRITE_IS_DEAD variables are not set if the creature is killed by a neutral creature."

Incorrect, it sets fine. Or possibly it refers to earlier/other versions of engine (vanilla PST?).




#595279 On SPRITE_IS_DEAD variables

Posted by GeN1e on 05 June 2017 - 02:09 PM in IE Help

Nothing then. Which is why it's advisable to always have a script name. At most you can set/overwrite it to use the actor entry's name in .are (bit3 flag) as a script one, but only if you pre-locate them instead of spawning.




#601186 Monetizing my work

Posted by GeN1e on 25 March 2018 - 07:21 AM in IE Modding Discussion

Official Beamdog response on the matter of fan content monetization https://forums.beamd...#Comment_959853

 

In simple English - you can accept donations of any kind, but you can't use paywalls to restrict access to your content.

Regarding Kickstarter (I thought it was unavailable in your place, no?), I believe it is fine if you use it to raise the sum but keep the content freely available to anyone, e.g. in public github repo.

 

Be advised that there was a case of one particular BG modding site erecting paywall around its forum and the latest version of one particular mod in development there, and it wasn't taken very kindly by the community (to put it mildly).

Also, if I were you, I wouldn't expect even $50 a month in donations. Maybe $20 tops if you really do manage to interest a couple people with too much money to spare, and that's a big gamble still. Talented artists with established publicity often make less than $100 on Patreon, so make your own conclusions if it'll even compensate for the time spent on monetization efforts alone, nevermind the actual work on ancient game.




#601293 Monetizing my work

Posted by GeN1e on 27 March 2018 - 05:16 PM in IE Modding Discussion

Serious question: if it's awesome, how will you stop people pirating it? The source code of every Weidu mod is free to inspect and share...
My opinion - if someone whines about piracy, then either he's a corporate jerk from EA/Ubisoft or he could've instead worked on the quality of content to attract more paying customers.



#601226 Monetizing my work

Posted by GeN1e on 26 March 2018 - 08:15 AM in IE Modding Discussion

I while ago I actually had a gentleman offering me money for helping out with a mod.
I've seen one such request too, some years ago.
I hope all the poor souls who suffered abuse answering your questions in seemingly infinite threads are going to get a percentage? :P
Where's the like button when you need one :D



#602326 Minion neutrality

Posted by GeN1e on 07 May 2018 - 02:29 PM in IE Help

AddXPWorth(O:Object*)

 

As for reputation and crime... Does CONTROLLED or ALLY work? If they do, you can keep the minion invisible via fade effect (check spirit trolls) and removal of foot circle.




#596892 Looking for some help with this script

Posted by GeN1e on 31 August 2017 - 08:01 AM in IE Help

Well, you may want them to stop and do nothing, like here.

That's shooting your own foot. While the actor waits, he can't evaluate other blocks.

 

A pause is what I want.

Use NoAction() blockers, I guess?

 

But that doesn't explain why the script above worked in reverse - why the surprise conditions started happening after three seconds instead of the no-surprise block.

Depends on what exactly is in your script, but most likely what I said about conditions not evaluating during the wait.

And if you have Continue(), then something like this

IF
  Global("SEE-BUT-CALM","GLOBAL",0)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,~Blah.~)
END

would be queued to execute after ~Wait() SetGlobal()~ finishes.




#596902 Looking for some help with this script

Posted by GeN1e on 31 August 2017 - 03:26 PM in IE Help

When your script runs for the first time, it evaluates the 1st block true and, since it has Continue(), the 3rd block as well. Actions from both blocks are added to the queue and only then that concatenation starts executing. What you really end up with is this:
   Wait(3)
    SetGlobal("SEE-BUT-CALM","GLOBAL",1)
        SetGlobalTimer("OFF-GUARD","GLOBAL",TWO_TURNS)
        ActionOverride(LastSeenBy(Player1),FaceObject(Player1))
        ActionOverride(Player1,FaceObject(LastSeenBy(Player1)))
        ActionOverride(Player1,ReallyForceSpellRES("OFFGU1_#",Myself))  // No such index
Structure like this should probably work for you (simplified, but you get the idea):
IF
  Global("seebutcalm","locals",0)
  Global("anxiety_timer","locals",0)
  Detect([ENEMY])
THEN
  RESPONSE #100
    SetGlobalTimer("anxiety_timer","locals",3)
    Continue() // safe to put it here, 4th block just will trigger on the next AI update pass
END

IF
  Global("seebutcalm","locals",0)
  GlobalGT("anxiety_timer","locals",0) // it was actually set by the previous block
  GlobalTimerExpired("anxiety_timer","locals")
THEN
  RESPONSE #100
    SetGlobal("seebutcalm","locals",1)
    SetGlobal("anxiety_timer","locals",0)
END

IF
  Global("seebutcalm","locals",1)
  !Detect([ENEMY])
THEN
  RESPONSE #100
    SetGlobal("seebutcalm","locals",0)
END

IF
  Global("seebutcalm","locals",0)
  !GlobalTimerExpired("anxiety_timer","locals")
  Detect([ENEMY])
THEN
  RESPONSE #100
    // act surprised
END



#596880 Looking for some help with this script

Posted by GeN1e on 30 August 2017 - 02:47 PM in IE Help

Wait() is an executable action, not a mere delay. Use timers instead.
Since you have Continue(), other global=0 blocks will return true on the first pass and get added to the action queue, executing after the wait is complete.



#596883 Looking for some help with this script

Posted by GeN1e on 30 August 2017 - 04:23 PM in IE Help

Action queue stops and Wait()s the specified amount of time before proceeding further.

This, for instance, is one of the reasons to not use Wait() in creature scripts, as they will physically wait and do nothing until duration expires, even if trigger conditions in other blocks return true.




#599054 Looking for a retroactive marker

Posted by GeN1e on 24 December 2017 - 11:45 PM in IE Help

There's no persistent saved data in IE.




#599065 Looking for a retroactive marker

Posted by GeN1e on 25 December 2017 - 04:23 PM in IE Help

Don't mess with the game data, or it will mess with you.




#599670 Limited-use melee weapons

Posted by GeN1e on 19 January 2018 - 02:18 PM in IE Help

As long as only blacksmiths are allowed to buy weapons, you can treat it as repairing the worn out item for the difference in cost.




#595217 Jerky AI due to multiple commands

Posted by GeN1e on 31 May 2017 - 09:34 AM in IE Help

You need to set a variable so that it doesn't repeatedly keep finding the conditions true and starting the action block fresh every time:
I'm in doubt, tbh. First, you can kill the script this way, even with NoInterrupt (not likely, but still). Second, this bit from SoD's bdshout.bcs works absolutely fine
 
IF
  Global("bd_retreat","locals",1) // in retreat mode
  Global("bd_combat","locals",0) // not in combat mode
  OR(2)
    !See(NearestEnemyOf(Myself))
    !Global("bd_no_combat","locals",0) // no script override
  !NearSavedLocation(Myself,"LOCALSbd_default_loc",5)
  !GlobalTimerNotExpired("bd_search_timer","locals") // i'm not looking for enemies
  !GlobalTimerNotExpired("bd_respond_timer","locals") // i'm not rushing to my allies' side
  Switch("bd_no_retreat","locals") // script override
THEN
  RESPONSE #0
    MoveToSavedLocation("bd_default_loc","LOCALS")
  RESPONSE #1
    SetGlobal("bd_retreat","locals",0) // deactivate retreat mode
END
 

IF
  Global("bd_retreat","locals",1) // in retreat mode
  Global("bd_combat","locals",0) // not in combat mode
  NearSavedLocation(Myself,"LOCALSbd_default_loc",5)
  Global("bd_no_retreat","locals",0) // no script override
  Switch("bd_retreat_escape","locals") // script override
THEN
  RESPONSE #0
    SetGlobal("bd_retreat","locals",0) // deactivate retreat mode
    SetGlobalTimer("bd_rest_timer","locals",1800) // rest after 6 hours
    MoveToSavedLocation("bd_default_loc","LOCALS") // try to reach the exact location one last time, if i was stopped two steps away from it
  RESPONSE #1
    DestroySelf()
END

PS I'll bet my money on ClearAllActions(). It's global, i.e. affects everyone in the area. If you've got two actors clearing each other every second, that might easily produce the observed behavior. Either use ClearActions() which is local, or just skip it entirely,, whatever actor has been doing will be overwritten by moving anyway.



#595283 It's ALIVE!!! I learned to resurrect them - and other

Posted by GeN1e on 05 June 2017 - 10:15 PM in IE Help

1) Creatures do not switch to the General type DEAD when they die.

Are you sure? It's possible to make e.g. a damage spell to produce additional effect when it kills its target, with 177 aimed at dead type.

 

Dead creatures are ignored by See() or Detect(), at least with any combination of other death triggers I have tried, like HPLT(LastSeenBy(),1) or a custom spell state persisting into death. But perhaps there is another way to latch on to them. Is it possible to refer to them by their blank script name?

[0.DEAD] might pick it up. If it doesn't, I suspect you're out of luck, because generic/missing script name is, well, generic to begin with. Being able to action override a bunch of them in succession is an unexpectedly nice bonus, not something to be taken for granted...

 

Anyway, aside from this it seems that it's possible to make corpses wear armor and possibly other equipment

If it's flagged as undroppable.




#600603 Incorrect damage from a weapon

Posted by GeN1e on 25 February 2018 - 01:45 PM in IE Help

Probably not, though I never checked it.




#600590 Incorrect damage from a weapon

Posted by GeN1e on 25 February 2018 - 08:10 AM in IE Help

Melee weapons receive +4 damage/thaco against targets without melee weapon equipped. Goes both for ranged and bare fists (except monk's).




#600777 How to send a creature to the nearest enemy?

Posted by GeN1e on 03 March 2018 - 08:00 PM in IE Help

As for actions, JumpToObject and MoveToObject only take script names or other definite objects.

I do believe it's your local environment playing tricks again. MoveToObject(LastBlah()) is an AI cornerstone, and I bet JumpToObject behaves no differently.

NearestXXX() does have a small problem of ignoring non-visible objects, however, maybe that's the case?