rotators / redefine Goto Github PK
View Code? Open in Web Editor NEWFallout scripts mass-editing
Fallout scripts mass-editing
I got this diff
--- scripts_pre/dcanna.ssl 2020-04-04 21:15:45.076130402 +0700
+++ scripts_post/dcanna.ssl 2020-04-04 21:15:49.164016004 +0700
@@ -159,7 +159,7 @@
else begin
if (obj_is_carrying_obj_pid(self_obj, 252) > 0) then begin
debug_msg("dcanna" + ": " + "setting DESTROY_ANNA" + "\n");
- debug_msg("dcanna" + ": " + " obj_is_carrying_obj_pid(self_obj, PID_ANNA_GOLD_LOCKET) == " + obj_is_carrying_obj_pid(self_obj, 252) + "\n");
+ debug_msg("dcanna" + ": " + " self_item_count(PID_ANNA_GOLD_LOCKET) == " + obj_is_carrying_obj_pid(self_obj, 252) + "\n");
debug_msg("dcanna" + ": " + "SETTING DESTROY ANNA" + "\n");
set_local_var(4, local_var(4) bwor 512);
end
As you can see, ReDefine processed the define inside string. It's harmless, but probably unwanted?
Hi. I couldn't find a separate repo for ReDefine, so I guess this is the only place where I can ask...
I'd like to try ReDefine for UP/RP, in order to reduce code volume further. As far I understand, it automatically processes headers, and replaces what's possible. That looks nice, but I have a few questions (and that's just getting started):
WARNING (IfArgumentIs) function<critter_add_trait> must be added to configuration before using this action : fileline<arroyo\acbrahmn.ssl:128> :: critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_ARROYO);
[VariableNotEquals]
my_var = TYPE
[Script]
MyFunc = RunAfter IfFunction:my_func DoVariable:my_var
editing my_func( args ) != 1
into my_var != TYPE_DEFINE
requires two runs - variables are processed before functions
To avoid duplicating conditions code (IfEdited
+IfNotEdited
, IfArgumentValue
+IfArgumentNotValue
, etc.), it should be possible to add !
before condition name to negate its result.
# Force scripts to use `bwand` instead of `==` when checking if player on worldmap
# get_game_mode ??? WORLDMAP -> get_game_mode bwand WORLDMAP
GetGameModeFix = RunAfter IfVariable:get_game_mode !IfOperatorName:BitwiseAnd IfOperatorValue:WORLDMAP DoOperatorSet:bwand,WORLDMAP
Currently all condition functions returns either true
or false
, and there is no way to distinguish between failed check or any kind of error (wrong number of If
arguments, trying to check arguments when script code part is variable, etc).
[ReDefine]
LogFile =
LogWarning =
LogDebug =
It was fine at start (especially in perl version), now it's simply annoying and clutters config
[Function]
should accept following versions:
my_func = ARG0_TYPE ? ARG2_TYPE
(current)my_func - [RETURN_TYPE] ? ARG1_TYPE
my_func = [RETURN_TYPE]
[Variable]
should simply accept:
my_var = TYPE
Edits:
0 = keep original formatting
1 = func( arg1, argN )
(default)
2 = func(arg1, argN)
3 = func(arg1,arg2)
@@ -272,8 +272,8 @@
end
procedure Node2217a begin
if ((item_caps_total(dude_obj)) >= 100) then begin
- item_caps_adjust(dude_obj, -100);
- item_caps_adjust(self_obj, 100);
+ dude_caps_adjust( -100);
+ self_caps_adjust( 100);
critter_heal(dude_obj, -((get_critter_stat(dude_obj,(35))) - (get_critter_stat(dude_obj,(7)))));
call Node022;
end else begin
3:1 = RunAfter IfFileName:0301.ssl IfFunction:f DoArgumentsMoveBack:0
@@ : fileline<0301.ssl:1>
<- f(a, b, c);
-> f(b, c,a);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.