Jump to content

Sam.

Modders
  • Posts

    496
  • Joined

  • Last visited

Posts posted by Sam.

  1. 20 hours ago, bob_veng said:

    How do i delete attachments? I've edited a post with an attachment by "deleting" the attached file and putting up a new one. But the old attachment is still on the site and downloadable in 'My Attachments', which doesn't have a control for deleting.

    There was some discussion on that here.

  2. What is the difference between stencil and dithered water in tilesets, and exactly what does the Degreenifier (tis2bg2.exe) tool do from a graphical/mathematics perspective?

    What else does one need to know on this topic?

    Of additional interest, who wrote tis2bg2?  I see a "(c)KD" in the CMD output.  Is that KingDiamond?

  3. On 9/14/2019 at 6:02 AM, Wisp said:

    it's the same deal with strrefs: -1 is a better no-value value than 0.

    I certainly agree -1 is the best value for no-value strrefs.

    On 9/14/2019 at 6:02 AM, Wisp said:

    Largely because it's not a structurally important detail. A null value does not cause the game to crash and does not cause patches to fail or to corrupt the file. However, if you think 0x2020 is a better no-value value, I can certainly change it

    A cursory test of ToSC shows no visible difference between 0x0000 and 0x2020 (and if any engine would care, I figure it would be the oldest), so I think the current behavior is fine.  No reason to change what isn't broken.  Thank you for the explanation.

  4. 29 minutes ago, Mike1072 said:

    I think it throws that warning because you have a variable named target that you've initialized previously.  So, you could:

    • change the name or scope where the variable was used previously
    • perform your suggested abomination to hide the warning
    • disable all warnings of this type
    • leave the warning in place because it's doing its job

     

    17 minutes ago, Wisp said:

    WeiDU is printing this warning because "target" evaluates to something other than its own string literal (the variable is set in the same scope from which you are calling the function).

    There are no facilities for not having this warning under these circumstances, short of turning off the MODDER option. If "target" does not need to be set in the scope of the function, you can try to isolate it with another function or WITH_SCOPE.

    You are both right (of course).  I am using target as a literal and as a variable within the same function call:

    STR_VAR str2 = "target" str4 = EVAL "%target%"

    I seem to get my desired result, so I guess I'll live with the warnings for now because changing the variable names would complicate the code, but we'll see.

     

    On an unrelated note, why does CREATE ~ITM~ leave the Item Animation field at 0x0000 instead of initializing it to the standard "none" value of 0x2020 ("  ")?

  5. I am passing

    STR_VAR str2 = "target"

    to a function with the intent of setting the variable "str2" to the literal string "target".  WeiDU is throwing me the following warning:

    WARNING: possible missing EVALUATE_BUFFER in
    [STR_VAR "str2" = "target" for LAUNCH_PATCH_FUNCTION "ps_append_str_inline_unless_default"]

    How can I convince WeiDU that I am doing what I intended without suppressing all warnings of this type?  All I can think of is

    SPRINT target ~target~
    STR_INT str2 = EVAL "%target%"

    But this seems like terrible programming...

  6. 6 minutes ago, Drakensang said:

    What would you lot think of a mega.nz repository with all the SHS and even gibberlings mods backed up there once SHS back online?

    The villagers will come with torches and pitchforks, and you will be burned at the stake.

  7. 35 minutes ago, Drakensang said:

    Are there any backups for the files on shsforums? Wanted to download a mod from there, but the waybackmachine was of no use in the end.

    Probably only from other people.  Which mods?

  8. I was looking through the ITM file format descriptions between the different versions, and found a few discrepancies.  I can make some PRs for some edits, but wanted to get some feedback first.  In addition to some capitalization, spelling, and minor jargon differences, these jumped out at me:

    Quote

    I.              ITM V1

    A.              Extended Header

    1.                0x0020            2 (word)          Offset to feature blocks

    a)                This seems to be an index into the feature blocks, not an offset.

    II.           ITM V1.1

    A.              General Description

    1.                Header: Size=114 Bytes

    a)                This is confusing considering the Header structure indicates a size of 154 (0x9A) bytes.  I have not checked an ITM V1.1 file to verify this value.  Can the graphic be updated to reflect a proper ITM V1.1 file?

    B.              Feature Block

    1.                0x0020            2 (word)          Dice Sides

    0x0024            4 (dword)        Saving throw type

    a)                Dice Sides should either be a “4 (dword)”, there is a missing field in here, or the offsets are incorrect.  I suspect the first option is the correct one, but have not checked an ITM V1.1 file to verify.

    C.              Header Item Type

    1.                Code    Item type>

    a)                Extraneous “>” in HTML code.

    III.        ITM V2.0

    A.              General Description

    1.                Header: Size=114 Bytes

    a)                This is confusing considering the Header structure indicates a size of 130 (0x82) bytes.  I have not checked an ITM V2.0 file to verify this value.  Can the graphic be updated to reflect a proper ITM V2.0 file?

    B.              Extended Header

    1.                0x0018            2 (word)          Dice thrown

    0x0019            1 (byte)            Secondary type

    a)                Dice thrown should either be “1 (byte)”, or the offsets are incorrect.  I suspect the first option is the correct one, but have not checked an ITM V2.0 file to verify.

    C.              Feature Block

    1.                0x0020            2 (word)          Dice Sides

    0x0024            4 (dword)        Saving throw type

    a)                Dice Sides should either be a “4 (dword)”, there is a missing field in here, or the offsets are incorrect. I suspect the first option is the correct one, but have not checked an ITM V2.0file to verify.

    D.              Header Item Type

    1.                Code    Item type>

    a)                Extraneous “>” in HTML code.

    Edit:  This forum software sucks at formatting anything more exciting than plain text...

  9. 16 hours ago, Mike1072 said:
    1. I think this is an oversight that can be removed from the docs & function parameters.

    That might count as breaking backwards compatibility (even thought it's really not), so while the documentation might be changed, I doubt the function will stop taking header.  While we're discussing potential changes, maybe the ADD_ITEM_EFFECT  and ADD_ITEM_EQEFFECT functions could return insert_point?

    16 hours ago, Mike1072 said:
    1.  
    2. If you are using READ_ASCII / WRITE_ASCII correctly, then you don't have to worry about it, so AFAIK nobody does.

    I'm generating code on the fly to recreate binary files.  I thought I could compare the original and new version to make sure everything was accounted for, but they are often not the same because of junk bytes behind the nulls.  It takes away a sanity check, but I'll make due.

     

    16 hours ago, Mike1072 said:
    1.  
    2.  
    3. It looks like READ_LONG and READ_SLONG are identical in implementation.  My guess is WeiDU internally treats all numbers as signed 32-bit integers, so unsigned 32-bit integers aren't supported.

    If anything I would have guessed it was a type casting issue when converting integers into strings.  If this really is the case, I'm shocked because doesn't that mean WeiDU couldn't do proper maths on numbers larger than signed 32-bit integers (and IE file formats do use UInt/ unsigned DWORDs, right)?  My issue is I am generating code on the fly with something like (modified for brevity):

    SPRINT var "WRITE_LONG   0x000c  %IdentifiedName%        //  Identified Name (strref)"

    and when %IdentifiedName% resolves to -1 I get:

    WRITE_LONG   0x000c  -1        //  Identified Name (strref)

    Which WeiDU chokes on.  I either have to quote every variable, or I have to add additional code to detect if the value is negative, which gets messy.  While we're at it, what's the best way to execute on-the-fly code?  Right now I'm writing to a temporary file and then INCLUDE ing it, but I feel like there has to be something better...

     

    Another question or two:

    4.  Is SET (as in "SET var = 123" or "SET var = ~%val%~") ever necessary to specify?

    5.  What are the rules about spacing out components of commands?  For instance "SET var=123" seems to work just as well as "SET var = 123", but I've encountered other instances (none in particular come to mind ATM) where not adding enough spacing threw syntax errors.  Maybe it was not including enough spacing in STR_VAR or INT_VAR declarations in function calls.  I'll try to take note of a specific example next time I encounter one.

  10. I hope it's okay if I ask a variety of not-necessarily related questions (mostly related to WeiDU coding) in the same topic rather than spamming the forum.  If not, I'll correct the error of my ways.  I'm not much of a WeiDU coder, and TBH I don't care for the style of the syntax:  I generally find it cumbersome and the opposite of intuitive.  Nevertheless, I'm interested in improving, and to that end, I have a few questions.  I'll try to keep it to a manageable number at a time.

    ADD_ITEM_EQEFFECT: adds an equipping effect to an item. All variables except probability1 are 0 by default. This is a PATCH macro and function. 
    [...]
    SET header to number of extended header (starting from 1) the effect should be added to (by default the effect is added to every header). 
    1. Why does ADD_ITEM_EQEFFECT function call for you to set header ?  Looking at the underlying macro, I don't think it is even used?
    2. Is it typical for the bytes after the first null in the 8 bytes of a resref to contain garbage data, or am I doing something wrong?  I'm looking at items ATM, and it appears this is common.
    3. When reading a value (like a strref) with READ_LONG and then printing the value, why do I get negative values (often -1).  I would have expected this behavior with READ_SLONG, but not READ_LONG...

     

  11. On 7/31/2019 at 3:48 AM, AL|EN said:

    I've added full suport for 'weidu tp2 README keyword', including localized ones. I've check and  'weidu tp2 README keyword' doesn't support url's - if you will put a link to the website, you will get error that 'File don't exist'.

    In my TP2 I have:

    README ~aurora/aurora-%LANGUAGE%.html~ ~aurora/aurora-english.html~

    As an experiment, I have also added small language flags to the top of the Readmes with links to the versions available in other languages.  Example.

    I believe using this approach has the following benefits (in no particular order):

    • Player is taken directly to the readme in their localization if it exists, or the English one if not.
    • If player wishes to read the readme in in a localization other than what they will be playing the mod in, there is secondary access to it (via language flag links).
    • Player always has access to copies of the readmes at least as updated as the version of the mod they are playing, regardless of internet connection.  For some, this may be a significant benefit.
    On 7/31/2019 at 3:48 AM, AL|EN said:

    By modders request, I want to add support for "online readme links". But there are some things to discuss:

    1. When you use ini readme, do you expect that %LANGUAGE% variable will work? Or you would simply put several links with different language as part of the link into ini Readme?

    If you can make the %LANGUAGE% variable work in the ini, that seems like a much more elegant solution than having different links to each readme and the modder needing to add links as additional localizations become available.

     

    On 7/31/2019 at 3:48 AM, AL|EN said:

    2. What if there is tp2 README and ini README? Which one should have precedence? What if the tp2 README has localized entry's and the ini README doesn't? If the ini readme will take precedence, the local localized entry's won't be displayed. Combining values from both of those keywords under some kind of condition would be complicated. Should I simply display all of them, local ones and links to remote ones?

    Local readmes are at least as up-to-date as the version of the mod they are shipped with.  However, since the online version must, by necessity, be updated before anyone can download a local copy, they may be more up-to-date.  In a perfect scenario, I would say it is best to default to the online version if a) it exists; b) there is an internet connection; and c) it is accessible (through any firewalls and the hosting site is not down).  If the online version can't be reached, drop back to using the local one.  Realistically, tho, this probably isn't overly feasible.

    On the other hand, you cover every possibility if you present the user with every link and let them use they one they want (or at least find one that works).

     

    On 7/31/2019 at 3:48 AM, AL|EN said:

    3. What if modder misinterpret the 'ini Readme keyword' and use it to provide relative paths to local readme files?

    Can you check if the path exists as a local file (in which case use that), and if not try it as a URL?

     

    On 7/31/2019 at 3:48 AM, AL|EN said:

    4. The localized readme file comes from translators, whey won't be able to update the localized readme version because they don't have access to the hosting site. So the online localized readme will be outdated and it it's updating would be up to modder/maintainer, not the translator itself. This doesn't appeal to me, because it means more work for mod author/maintainers.

    I'm not sure I understand what you are getting at.  For my mods, new or updated translations usually come to me in forum posts or PMs, and only occasionally as pull requests.  Yes I have to take 10 minutes to add it to the GitHub repo and push the commit, but personally this is preferable to allowing anyone and everyone to update my mods or their readmes.  Are you saying there is an alternative solution that still grants me some semblance of control?

     

    On 7/31/2019 at 3:48 AM, AL|EN said:

    5. The changelog-part of the localized readme is outdated 90% of the time.

    True, but the recent changelog of more and more mods, even in the primary language, is going the route of "see GitHub commit history for full list of recent changes".  I'm not saying it's a perfect solution, but it certainly cuts down on the amount of work for mod maintainers and translators.

  12. FWIW (probably not much):

    I've been in the mood to actually play these games again (for the first time in a year [or two?]), and have been really looking forward to giving IWD-in-EET a try.  Now that I hear IWD isn't really going to be part of the story, I'm having second thoughts.  Honestly, I generally like IWD more that BG2, and I couldn't possibly care less if there are storyline conflicts between the same antagonist being in both IWD1 and SoD as long as IWD1 is added to the trilogy (tetralogy?).  I don't care one way or the other about time travel IF AND ONLY IF (ALL) characters, items, experience, etc. go with me AND come back.  I have no interest in spending months playing a 'sidequest' with nothing to show for it at the end.  That would be an instant deal-breaker for me.  Also, I don't want to have XP reductions shoved down my throat.  If you feel you must add them, please make them optional.

     

    PS.  Thank you K4thos for the months and years you have put into this project.  It is appreciated even if I don't entirely agree with your current direction.

  13. On 7/13/2019 at 5:43 PM, Daxtreme said:

    Hey guys if I add the "trap" region above...

    Will the "No Traps or Locks (Weimer)" component of the Tweaks Anthology remove it?

    It's not even a trap it's just a trigger region to teleport the player, but I'm not sure how the mod recognizes it.

     

    On 1/13/2019 at 8:38 AM, CamDawg said:

    Alright, so I've refined the algorithm here a bit. In the old BG2 Tweaks and Ease of Use, it was brute force: all containers and doors had trapped flags removed and lockpick difficulties set to zero. Floor triggers had a basic check to ensure it wasn't a special event region by checking that it could be detected (values of 1 to 99 inclusive) and then removing the trapped flag.

    Tweaks v7 sought to refine this a bit. Containers and doors now only had their traps/locks removed if they had a valid detection/lockpick score, essentially the same 1-99 check that was being applied to floor triggers. The problem was that some containers, such as the ones noted here by @AnonymousHero, have a detection difficulty of zero despite being perfectly valid traps.

    So v8 is going to refine the algorithm again. Floor regions, containers, and doors will now check if trap detection is not equal to 100 (instead of 1-99). Scores of 100 are the engine's special undetectable value and the default score for untrapped stuff. Instead of checking on lockpick scores, Tweaks will now directly check if a container or door requires a key, and zero the lockpick score if no key is required. Keep in mind that this change now means you will need to care about keys again instead of just bashing doors, but it should also prevent you from getting into areas and places you shouldn't be.

     

×
×
  • Create New...