Jump to content


i30817's Content

There have been 71 items by i30817 (Search limited from 25-April 23)


By content type

See this member's


Sort by                Order  

#556946 RFE: a component to make the thugs 'respect' you.

Posted by i30817 on 07 April 2013 - 12:29 PM in PS:T Tweaks

The sigil thugs on the main maps that is; that repawn. Something like kill 10, and they don't become hostile anymore.

Could even get some floaters 'no man, not that one', if you really want to ham it up.




#555691 WARNING: Do Not Install NeJ - IT WILL BREAK YOUR GAME

Posted by i30817 on 09 March 2013 - 12:09 PM in Mega Mod Help

Yer-ye




#555376 Questions about transition

Posted by i30817 on 01 March 2013 - 03:07 AM in BGT Archive

Speaking of which, would it take too much work to do the same to npcs that were dropped from the party?




#554249 iiSpellSystemAdjustments

Posted by i30817 on 02 February 2013 - 03:30 PM in Mod Resurrections

I have a somewhat evil suggestion for this mod...

 

See if it's possible to code a component to disable resting (except in inns, genies etc).

 

edit: lol nvm, haven't played so long i forgot this was a option on the tweakpack right?




#552352 Public test release feedback

Posted by i30817 on 29 December 2012 - 01:04 PM in ToBEx

Asc64 did you see this?

http://www.shsforums...quest/?p=552280




#552135 TobEx Wish list

Posted by i30817 on 25 December 2012 - 03:57 PM in ToBEx

I'd want to be able to use something like that from a dialog. And if possible, without extra file editing. The eff file format scares me, and i've not used it because of that. Since i want to do something complex (incrementally adding 'stats', from calculations derived from locals/globals), i'm not at all sure if i can do it efficiently.
For instance, i assume that adding 1+ creature effects might eventually slow down the game or lead to bad things, if there are hundreds of these little increments. Ideally it would be possible for me to 'remove the old' and 'add the new, accumulated', so a sort of ID would be nice (or at least, that eff on a single stat are merged or something).

This is also a obvious problem for 'percentage modifiers'. I assume the engine has a defined, sorted order in which it applies things.



#551946 TobEx Wish list

Posted by i30817 on 22 December 2012 - 05:15 AM in ToBEx

And what about writing to stats, not just reading them? Supported?



#551790 TobEx Wish list

Posted by i30817 on 20 December 2012 - 12:59 AM in ToBEx

^ pretty cool.



#551757 TobEx Wish list

Posted by i30817 on 19 December 2012 - 06:08 AM in ToBEx

Been away. Can one already read Stats into variables? From what i can tell, the scripting already allows aritmetic on globals and locals, but i also need something to show/increase stats that is user controlled. I was hoping to use the dialog engine since doing it from the normal levelups screen is out of the question (?)

I want to make classes have thief abilities without being thieves.



#548007 Public test release feedback

Posted by i30817 on 07 October 2012 - 11:59 PM in ToBEx

Not to put words in Asc64 mouth, but it's probably the hashmap/table optimization for globals that was discussed a while ago (proudly think i was the first one to suggest a hashcode collision - my comp sci degree was not wasted finally)



#542399 [COMPLETED] Script variable substitution: triggers and actions

Posted by i30817 on 03 June 2012 - 07:53 PM in ToBEx

Been looking at this: do stats give a way to get the object coordinates?

At first look it looks like
storepartylocations()

could do it, but that seems like a transfer to the "current" GAM file, not really the origin of the info (i assume the action exists because it gets out of date?)

Anyway, something to read the GAM file variables in triggers/actions would be nice. However, if that file/memory structure is only "actually" updated on savegame, pulling the values from the sources of that update would be best (for instance, not "StorePartyLocations()" and read from the GAM struture, but read directly from the where "StorePartyLocations" is reading.)

Also, for applications it would be nice to get not only partymembers locations but also other objects like clouds, traps, gold piles, etc.



#542367 [WIP] Expanded Lua Console

Posted by i30817 on 03 June 2012 - 03:22 AM in ToBEx

That could be dangerous if you saved after, since dialogs can change the game state, and if it gets into a 'inconsistent' state, the quest would get (more) messed up (not to mention mods that change the state of other mods variables - i hope that doesn't happen at runtime).

If there was something like a 'transaction mode' for dialogs such a loop breaker could be useful for reporting dialog bugs - activate debug mode, game variables get copied before dialog, enter infinite cycle, break out of dialog by hotkey, old game state gets restored, auto-savegame (with a name like dialogxxx_1213 - last number being the dialog options taken) and give the save on the mod forum
(fancier would be some way to figure out which mod was responsible and email directly, but that is pushing it to unstandardized realms).



#542075 [WIP] Expanded Lua Console

Posted by i30817 on 27 May 2012 - 12:44 PM in ToBEx

Could LStat be improved/integrated somehow without performance degradation until it is used?



#542074 Uninstall TobEx on Linux Wine?

Posted by i30817 on 27 May 2012 - 12:27 PM in ToBEx

why? It does work on wine.

What doesn't work on wine is installing mod stuff without waiting for ages, especially if you're doing a BGT. Installing in (maybe virtualized) windows sorts that out though.

And you ARE aware that running ToB in wine is quite tricky??

If you put this file above the dir that contains the game (named "BGII - SoA") and run the game by executing it, it should deal with the 'tricky' parts
Spoiler


Most of that is just making the game not need to be 'installed' the config file modification especially. But this:
#bug on baldur's gate with saves in wine
rm -f ./temp/default.tot
ln -s ./temp/default.tot ./temp/default.tot

is important for some boneheaded reason for IE; otherwise the game hangs while saving on wine
the virtual desktop the same resolution as the game resolution - 1024x768 in this case - is also important to sort a mouse bug in the menu.
You'll also have to edit the lines:
sed -i "s|CD2:=.*|CD2:=${path}/CD\r|g" baldur.ini

bolded part to actually point to the right directory in your installation - i consolidated all the 1-5 CD directories when i figured out the duplicated files are exactly the same.



#542030 [COMPLETED] Script variable substitution: triggers and actions

Posted by i30817 on 25 May 2012 - 08:29 PM in ToBEx

I'm willing to wait and see how people use tn[] and ts[] before I modify anything as such. I suspect modders will primarily create their own new 2DA tables for Assign() use other than use existing ones (though L1NPCs would probably use XPLEVEL.2DA a lot).

Even in java, i tend to use the 'Maybe' functional pattern for initialization. You know, read this, but if you can't return this value i give as argument (though in the real Haskell Maybe, it's more like 'this computation').
This could work for ints, but probably not for strings (because of the "only one string" limitation).

Advantage being, reading and the 'null value' substitution could be generalized to 1 function for the user. Although that has the disadvantage of triggering for all failures, not only "can't parse this" (file deleted, file truncated etc) that are likely indication of other bugs.
edit: i forgot about no overloading... though it would be nice



#541763 [COMPLETED] Script variable substitution: triggers and actions

Posted by i30817 on 19 May 2012 - 03:58 AM in ToBEx

if you did the "suffix" thing couldn't you have your cake and eat it with mathpresso?

From it's wiki page variable code:
// Create variables that can be used in expression.
MathPresso::mreal_t variables[] = { 1, 2, 3 };
const char* names[] = { "x", "y", "z" };


So using @1_PC_Level, @1 gets parsed and decides where to put it on the variable array:
variables[0] = int_value;
variable 0 (1) changes name:
names[0] = "@1_PC_Level";

And mathpresso would freak out without you checking for it if the scripter later on used @1_PCLevel or another similar typo?
edit: you'd need to check it for strings though since they are not going to the evaluator.

That actionoverride thing is ... unfortunate. I had the idea that the variable arrays were static and shared to all objects (but i suppose it's a good idea to have them private to not always be reading things from files like 2da if you can avoid it). But even if it did not dup them, i guess the "ActionOverride needs to clear all array variables" (why?) would put a end to that.
But then again, if the variables of your current object are going to be regularly and inevitably cleared, why not make it static?

About Eval being useless with AO - that's bad news isn't it? Since AO is the only way to affect a creature from another script.



#541665 [COMPLETED] Script variable substitution: triggers and actions

Posted by i30817 on 17 May 2012 - 05:19 AM in ToBEx

Well, a type conversion is made anyway if you use an argtype of INT when reading from 2DA tables (which are stored as CStrings), so ***** would be converted to a value of 0.


Is x<=0 going to be the "universal" way to test invalid values?

I know some use -1 too instead of *****.

Could the returned value be -1 then? I'm unsure if any table uses 0 as placeholder currently.
Failing the trigger is unambiguous, but semantically **** is the same as -1 on some tables and yet if **** failed and -1 passed it would be inconsistent.

So i'd rather ***** (or any other string value converted to int) return -1 all things considered

I know it won't cancel *, but it seems a way to test also the tables that use -1 as placeholder with the same pattern. I've never seen a table with negative numbers otherwise (maybe something about AC?).



edit: i suppose each table is a case. If it uses ***** safest would not to perform the conversion until you know that it's a valid value by comparing it to the "table null". If it uses 0 or -1 or ****, you read it and compare to the "null" and only go on then.
Annoying data inconsistency. I suppose it's unstandardizable since there are oddles of code using it.



#541659 [COMPLETED] Script variable substitution: triggers and actions

Posted by i30817 on 17 May 2012 - 03:37 AM in ToBEx

Why the AssignFromObject; ActionOverride wouldn't work or just convenience?

type conversions from integer to string: could they be possible in the assigment since type mixing iin eval is not on the cards - it appears you don't want to support them in either of the cases?
tn[] and ts[] (which i assume is pure string) seem to lose a bit of usefulness if they can't be converted to ints too - but in their case it's dangerous since even numeric tables sometimes have "marker" values like *****; and there is no consistency. Could the assign trigger just ... fail and return false if a type conversion fails?

finally as a documentation aid, could the variables be have a *prefix* or maybe *suffix* so that they can be self documenting?

@1_PC_LEVEL or @PC_LEVEL_1 - ugly but better than comments everywhere.

edit: the above wouldn't be name checked though. Only the @1 part would be functional so if the writer typos the documenting suffix afterwards it would be ignored (but cause slight confusion).

This might be a bad idea if later on you resolve to add "real" named variables (because of all the typos in existing code then).



#541463 LolFixer Thread

Posted by i30817 on 14 May 2012 - 07:24 AM in Mega Mod Help

Be careful with the gender and sex stuff - i think that stuff is commonly overloaded as a summoning flag (for some reason)



#541441 [MAJOR] Creature script is not executed

Posted by i30817 on 13 May 2012 - 07:53 PM in ToBEx

Suslik about the stutter fix; are you sure the optimization you did for only writing to 10% of the buckets is correct?
What if they are all filled? Rehash and recurse, sure, but the hashcode will not introduce new spaces on hashcodes that were already linear.
If by some reason there is a sequence of (natural) hashcodes with
1, 2... 10 in buckets 1, 2..., 10 and you try to add (another) key with hashcode 1...
changing the size of the array and rehashing will not change the sequence - so infinite cycle?
Does the hashcode take the table size into account in a non-linear fashion (ie: 2+t.size,3+t.size is linear; 2*t.size,3*t.size is not)?

You can verify if the table affects the hashcode somehow by checking the value of 2 hashcodes of the same key before and after a rehash (but not if they are linear, though there wouldn't be a point otherwise i guess).


Anyway, if it is safe on the write end, it will be safe to restrict on the read end too, so i don't see why that optimization couldn't be used.

Doh i keep forgetting it's not a fixed value of buckets, but 10% after resize. That should eventually end in a free bucket yeah. And i just thought a bit and the read "optimization" is irrelevant anyway. If the value is always in the first 10% the rest of the table is not checked.



#541300 Feature request: Add Suslik's enhanced GLOBAL hashmap for PS:T

Posted by i30817 on 11 May 2012 - 11:56 AM in PS:T Fixpack

Never happened to me... the game hasn't that many mods.



#540993 [WIP] Expanded Triggers

Posted by i30817 on 05 May 2012 - 10:09 PM in ToBEx

Hmmm?
"* 'c' - assigns a constant value; params is a number, e.g. c[1], or string, e.g. c[FOO]"

Why? Isn't putting that constant on the right Eval equivalent?
You forgot to mention that a @var can't be used in a INT eval or a math expression on a String Eval (without doing it in the assignment anyway).


edit: = symbol ... interesting, mathpresso has assignments.



#540760 [WIP] Expanded Triggers

Posted by i30817 on 03 May 2012 - 06:44 AM in ToBEx

yeah, you're right about the boolean expr, since there is no trigger that takes a 0 and returns false and 1 and returns true (or whatever's the convention) - that's why i thought a new isTrue trigger a good idea (but only if the library supports boolean expr).

If "a < b" etc, returns a int you could maybe compare it to 0 with EQ. What really hurt was no functions and the "x ? a : b" construct (which would be very useful!), though i don't think it's finished in the muParserSSE svn (i haven't tried it or tried to compile, it's only the changelog that says it's there, but i didn't see any obvious function in the parser source file).

So if you say it's easy to add functions to mathpresso (also to the other i guess), it makes no major difference.
% is useful though - if you can't use the fork, a function for the same thing would be nice.


Are you going to try some kind of performance test? I worry that jits are supposed to be used with code caches. Maybe mathpresso has a simple one, (probably) not. It's possible they are only faster than a straight interpreter if you have some kind of caching - they even mention that changing the arguments requires recompilation (which is what worries me, you'll be always recompiling when there's actually no need most of the time). If it was only the expression that required compilation, a cache would be "easy", just map locations to compiled code. As it isn't, you could maybe replace the strings by real values (concrete) values, make that string a key for a compiled code, and use that as cache -> when the arguments change -> requires recompilation (and clearing the old value somehow).
Only maybe the library is already doing what i said above under the covers...

BTW:
reciprocal(x)
doesn't inspire me with confidence if the author couldn't add unary operators to his parser.



#540731 [WIP] Expanded Triggers

Posted by i30817 on 02 May 2012 - 09:01 AM in ToBEx

Just thought of something rather nice muParserSSE seems to have that mathpresso doesn't beside the functions - boolean expressions.
Sure, you can use the E, LT and GT triggers for that too, no problem - and maybe it's better to go barebones if it requires additional dlls, your choice.

edit: and if you use the svn here (can compile it):
http://muparser.svn....443&view=markup

it also has if then else " a < b ? a : b" and && and || operators.

edit2: seems like it was added and removed. bah.



#540723 [WIP] Expanded Triggers

Posted by i30817 on 02 May 2012 - 05:19 AM in ToBEx

There is an issue with muParserSSE in that the .dll requires Visual C++ redistributables to be supplied. MathPresso requires AsmJit.dll. For this implementation, what useful features does one have over the other?

Just making the observation that neither has strings, string operators or functions operating on strings.
But muParserSSE does have lots of useful functions (and the min and max operators). It doesn't look like mathpresso has any embedded functions.


Really just the same as my Eval("foo", INT, x). Note that even with your method, a special case needs to be made for something like your Eval("@1", x).

The string evaluation library would just return a error since the variable would not be recognized since it's memory location wasn't registered (since it's a string).

I understand now why you're going with the 2nd argument - it just bugs me that different types of substitution will use the same function although they do different things.