I see you've done the transition already with your "august" release.
I just did a diff against the previous release and something leapt out at me
scripts/1.cfg
Code: Select all
// if (&& sneaking undetected) [
// pickpocket
// ] [
+ if (r_hostile self actor) [
+ r_signal "ai threat" actor self 0
+ ] [
+ //r_signal "talk" actor self 0
+ ]
// ]
]
]
]
others
Code: Select all
+include scripts/1
+
r_script_signal interact [
if (r_matchref player actor) [
if (= (r_get_state self) $CS_DEAD) [
r_signal "loot" actor self 0
] [
+ r_chat self "main"
]
]
]
You're not really specialising their behaviour, so why would you do that?
This will cause the NPCs to trade and otherwise communicate with the player whilst trying to snuff him - could be funny.
...But I see you did comment out the default call to the "talk" signal which should be defined for opening dialogue.
some other wtfs...
20.cfg
Code: Select all
r_script_signal loot [
r_global_set $ridaztravel_quest 2
-include "includes/loot_old"
]
It's great that you've removed the old loot script, but you cannot loot this guy.
I'd suggest using r_script_signalappend to add the global variable change to this
24.cfg
Code: Select all
r_script_signal interact [
if (r_matchref player actor) [
if (= (r_get_state self) $CS_DEAD) [
r_signal "loot" actor self 0
] [
- r_chat self 0
+ if ( = (r_global_get $ancestor_search) 4) [
+ ][
+ r_chat self "main"
+ ]
]
]
]
another case of the first issue.
You could've used the default script with
Code: Select all
r_script_signal "talk" [
if (= (r_global_get $ancestor_search) 4) [] [
r_chat self "main"
]
]
As for launch errors...
Code: Select all
unknown command: kdd/fireball_explode
I'm glad you at least got it down to 1 line instead of the 30 odd lines+ which the previous versions had.
I'll have a quick run through and share some more impressions in a bit.
EDIT
Had a quick play around and my framerate is terrible
Here's a fun exercise, run kelgar with -kpath/to/sandbox/packages assuming kelgar doesn't share any content paths, if you see robochimp anywhere (or other glitches), you've got stuff to do/fix!
I also managed to get critters to print "no such dialogue node 0" a few times.
I upset the villagers too and they tried to come after me and I could talk to them still (predictably)
anyways, for things like triggers 0, 36 and 39...
0.cfg
Code: Select all
// digging trigger
r_trigger_name "Mud"
//r_trigger_mdl "kdd/mudpile01"
r_trigger_script 21
What I want you to do here is give it a model and then give it the invisible flag - this prevents it from rendering and the model will give it a proper bounding area. Keep in mind that without specifying a proper working model it will try to load that invalid model every frame
And the renderer will in fact try to do so multiple times!
This absolutely kills framerate
The "after" should look like so
0.cfg
Code: Select all
// digging trigger
r_trigger_name "Mud"
r_trigger_mdl "kdd/mudpile01"
r_trigger_flags $TRIG_INVIS
r_trigger_script 21
Also, you can remove all those excess triggers for "items" you used to workaround some physics issues.
I've added some stuff into the code that should alleviate most of the past issues, like merging identical items on the same spot as well as throttling updates (so you might occasionally see items hover in midair for a few seconds).
It must be a pain to maintain all those scripts and triggers in addition to the items...
Also, I think you should consolidate scripts 0-7 to match the order of sandbox's default game - they're like that for a reason you know
And lastly, AI.
Remove your "update" signals if they just make the NPC attack the player, this is handle in the "ai update" signal which is also throttled to prevent it bring too expensive. Doing it in the "update" signal is ill advised and can be pretty costly.
Also actions are merged now if the AI has a duplicate variant already, so clearing is no longer required.
Also, some other signals, like "hit," use r_script_signalappend here to play the sounds - as the other logic is handled already inside 1.cfg - the same goes for "collide"
And get rid of those interact blocks too while you're at it, they don't do anything special the default one doesn't handle or you can easily define when it calls "talk"... that includes snowflake's "grr" sound.
Also script 63 will never be triggered - since triggering the trigger disables collision with it entirely
script 30 still uses the old loot system.