Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Wisp
« on: October 10, 2013, 03:53:22 AM »

Missed that earlier somehow. Just regular sc#addWmpAre usage. It creates/looks for save and mpsave in the game folder rather than in .../User/Documents/BGEE/etc on WinXP.
Unfortunately, I don't think I am able to install BGEE on my WinXP system. But there are two potential points of failure in the code: either your game is not detected as BGEE, or WeiDU reads the wrong path from the registry. Does ADD_JOURNAL work on your BGEE game? (If so, it's detected as BGEE.) Can you also confirm that the actual value of %SAVE_DIRECTORY% is incorrect (e.g., by PRINTing the value)? Are you able to navigate the Windows registry and look up the value WeiDU is using? If so, it is "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"->"Personal" (sorry, I don't know what terminology is used when referring to the Windows registry). The value of "Personal" should be your Documents directory.
Posted by: Miloch
« on: October 09, 2013, 09:11:37 PM »

What sort of TP2 code are you running when the save and mpsave directories are created?
Missed that earlier somehow. Just regular sc#addWmpAre usage. It creates/looks for save and mpsave in the game folder rather than in .../User/Documents/BGEE/etc on WinXP.
Code: [Select]
LAUNCH_ACTION_FUNCTION sc#addWmpAre
  INT_VAR mapIcon = 29    // map icon
          xCoord  = 1000  // x coordinate
          yCoord  = 250   // y coordinate
          tTime   = 2     // travel time *4, so two means eight hours
          inclSv  = 1     // include saved games bool: 1 means yes and 0
  STR_VAR areName = "AX0950" // area reference
          strName = ""    // area name
          strDesc = ""    // area description
  RET areNum = areNum
END
Posted by: Wisp
« on: October 09, 2013, 08:50:32 AM »

Along these lines, I noticed the current beta creates save and mpsave in the game folder if they don't exist. Should it not be looking for them in the SAVE_DIRECTORY or do you have to explicitly set that (i.e. there isn't a default where it can get the user's documents folder from the registry or something)?
Still an issue in v232.
What sort of TP2 code are you running when the save and mpsave directories are created?
I still can't reproduce your problem. It is perhaps also worth noting that on GNU/Linux, I have defined the game dir to be the user dir (so that is where %SAVE_DIRECTORY% is) because it was easier for me that way. If it should be elsewhere (e.g., for Wine support), I need to know where that is.
Posted by: Miloch
« on: October 09, 2013, 08:31:36 AM »

Along these lines, I noticed the current beta creates save and mpsave in the game folder if they don't exist. Should it not be looking for them in the SAVE_DIRECTORY or do you have to explicitly set that (i.e. there isn't a default where it can get the user's documents folder from the registry or something)?
Still an issue in v232.
Posted by: Miloch
« on: March 21, 2013, 04:17:34 PM »

Well, I fixed sc#addWmpAre (and COPY_ALL_GAM_FILES) last night.
As in, you fixed them to work with EE saved games? If so, can we get a new beta?
Posted by: Wisp
« on: March 14, 2013, 11:02:18 AM »

Well, I fixed sc#addWmpAre (and COPY_ALL_GAM_FILES) last night.
Posted by: GeN1e
« on: March 14, 2013, 10:00:06 AM »

Most likely GET_DIRECTORY_ARRAY on "save" and "mpsave" folders. IIRC sc#wmpAre does that.
Posted by: Wisp
« on: March 13, 2013, 01:02:53 PM »

Along these lines, I noticed the current beta creates save and mpsave in the game folder if they don't exist. Should it not be looking for them in the SAVE_DIRECTORY or do you have to explicitly set that (i.e. there isn't a default where it can get the user's documents folder from the registry or something)?
What sort of TP2 code are you running when the save and mpsave directories are created? WeiDU does not contain anything general for creating the directories. Only a few specific bits of functionality seem to do so (the aforementioned two).
Posted by: Wisp
« on: March 12, 2013, 11:31:58 AM »

Along these lines, I noticed the current beta creates save and mpsave in the game folder if they don't exist. Should it not be looking for them in the SAVE_DIRECTORY or do you have to explicitly set that (i.e. there isn't a default where it can get the user's documents folder from the registry or something)?
I'll look into it. It's probably some automatic stuff to make the dirs if they don't exist.
But I suppose we shall need an MPSAVE_DIRECTORY variable as well, and sc#wmpAre and the GAM stuff needs to be updated to use them..
Posted by: Miloch
« on: March 11, 2013, 07:04:45 PM »

Before the dry spell I implemented a SAVE_DIRECTORY variable, which will let Miloch et al. access save files of enhanced and original versions in a platform-independent manner. I have since also decided I should get WeiDU working with BGEE's multiple TLKs. After this much time it would be silly releasing without it, or maybe it would have been silly all along.
Along these lines, I noticed the current beta creates save and mpsave in the game folder if they don't exist. Should it not be looking for them in the SAVE_DIRECTORY or do you have to explicitly set that (i.e. there isn't a default where it can get the user's documents folder from the registry or something)?
Posted by: Wisp
« on: February 27, 2013, 11:49:56 AM »

As much as I cherish the AUTO_EVAL_STRINGS flag, what happens when you explicitly do NOT want something evaluated?
What with WeiDU's crazy evaluation scheme I am not at all sure it would be possible. I'll keep it in mind for when I have sufficiently unwound the eval code.

It should be possible to add something for sorting arrays.
Posted by: GeN1e
« on: February 24, 2013, 03:54:12 PM »

As much as I cherish the AUTO_EVAL_STRINGS flag, what happens when you explicitly do NOT want something evaluated?

Also, can we have
Code: [Select]
REARRANGE_ARRAY array_name patch (and action too, perhaps), that will restructure an array into numeric and alphabetic order by its keys?

This is the third time I found myself wanting it, so I went ahead and wrote this for single-keyed types
Code: [Select]
DEFINE_PATCH_MACRO rearrange_array BEGIN
  SPRINT ag#ra_max ~~
  CLEAR_ARRAY ag#ra_aux
  CLEAR_ARRAY ag#ra_aux2
  PHP_EACH ~%rearrange_array%~ AS ag#ra_i => ag#ra_r BEGIN
    SPRINT $ag#ra_aux("%ag#ra_i%") ~%ag#ra_r%~
    SET $ag#ra_aux2("%ag#ra_i%") = 1
    PATCH_IF (~%ag#ra_i%~ STRING_COMPARE_CASE ~%ag#ra_max%~) > 0 BEGIN
      SPRINT ag#ra_max ~%ag#ra_i%~
    END
  END
  CLEAR_ARRAY EVAL ~%rearrange_array%~
  PHP_EACH ag#ra_aux AS ag#ra_i => ag#ra_r BEGIN
    SPRINT ag#ra_min ~%ag#ra_max%~
    PHP_EACH ag#ra_aux2 AS ag#ra_i2 => ag#ra_r2 BEGIN
      PATCH_IF ((~%ag#ra_min%~ STRING_COMPARE_CASE ~%ag#ra_i2%~) > 0) && (ag#ra_r2) BEGIN
        SPRINT ag#ra_min ~%ag#ra_i2%~
      END
    END
    SPRINT $ EVAL "%rearrange_array%"("%ag#ra_min%") $ag#ra_aux("%ag#ra_min%")
    SET $ag#ra_aux2("%ag#ra_min%") = 0
  END
END

SPRINT rearrange_array array_name
LPM rearrange_array
except an innate WeiDU command may be better, because it then would be safe from AUTO_EVAL_STRINGS. Plus I don't know how to catch properly multi-keyed arrays in the open variable environment.
Posted by: DavidW
« on: February 14, 2013, 06:09:01 PM »

It's a great idea(not that you don't know that)!

I have a perhaps silly question: as of today, all BG-EE-compatible mods are released with two Weidu.exe copies attached, be it DavidW's SCS v22-beta or BG-EE compatible XanBG1Friendship Kaeloree coded for me. It's obviously not the best decision and weighs 700kb extra. Can a new version of Weidu(maybe not the next one, but eventually) make it unnecessary?

In the case of SCSv22, I'm just being lazy. One version is the standard copy, one is for the auto-install program that ships with SCS. It's nothing to do with BG:EE per se. I could probably get the install file to duplicate it but I didn't want to muck around with that kind of thing at the beta-testing stage.
Posted by: GeN1e
« on: February 14, 2013, 03:51:52 PM »

I think the BGEE batch script can simply copy the setup-mod.exe into weidu.exe and then run it as usual?
Posted by: Kulyok
« on: February 14, 2013, 05:12:36 AM »

It's a great idea(not that you don't know that)!

I have a perhaps silly question: as of today, all BG-EE-compatible mods are released with two Weidu.exe copies attached, be it DavidW's SCS v22-beta or BG-EE compatible XanBG1Friendship Kaeloree coded for me. It's obviously not the best decision and weighs 700kb extra. Can a new version of Weidu(maybe not the next one, but eventually) make it unnecessary?