Page 25 of 27 FirstFirst ... 15161718192021222324252627 LastLast
Results 481 to 500 of 535

Thread: General discussion (use of already implemented functions, etc.)

  1. #481
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,831
    Blog Entries
    23

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by youneuoy View Post
    [...] then it should not be in your folder be the file kingdoms.exe).
    I am afraid more often then not the Steam version will have a kingdoms.exe file as well - it will however be a exact copy of the medieval2.exe file. For the principle\reason see here.
    If it's not too difficult to implement then one way to check the version (disk or steam) will be to check the path. If it has 'common' before M2TW then it's Steam: ...\common\Medieval II Total War\mods\[mod name].
    Another surefire check would be to test for the presence of the steam_api.dll file in the game's root directory.

    Quote Originally Posted by Lord Baal View Post
    I mean about the icons. Most mod icons are named launcher.ico, icon.ico, mod.ico, "modfoldername".ico... you could try to read and load such files, or as generally there will be a single icon file in the folder load the first .ico file it founds in there. If all that fails, then the user then can select it manually.
    Only reliable way is to look for an ico file in the complete mod installation - while highly unusual mine is not even in the root folder of the mod, it is in my file check custom folder (mods\[mod name]\verify) to keep the root as clean as possible.
    Last edited by Gigantus; August 13, 2020 at 02:37 PM.




  2. #482
    Lord Baal's Avatar Praefectus
    Join Date
    Apr 2011
    Location
    Republica de Venezuela
    Posts
    6,586

    Default Re: General discussion (use of already implemented functions, etc.)

    But there could be another icons in the mod folder if there are custom cursors doesnt? Please correct me if Im wrong.
    PROUD TO BE A PESANT. And for the dimwitted, I know how to spell peasant. <== This blue things are links, you click them and magical things (like not ending up like a fool) happens.
    Visit my utterly wall of doom here.
    Do you wanna play SS 6.4 and take your time while at it? Play with my 12 turns per year here.
    Y también quieres jugar Stainless Steel 100% en español? Mira por aca.

  3. #483
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,831
    Blog Entries
    23

    Default Re: General discussion (use of already implemented functions, etc.)

    The cursors are actually CUR files as they are supposed to be. It nearly got me as the 'type' description in my folder said 'icon' (I got them linked to GIMP) but checking the properties revealed them as cur, not ico




  4. #484

    Default Re: General discussion (use of already implemented functions, etc.)

    New test version:


    added the ability to unlock all console commands (183 items). If you enable full logging, a file with the names of the commands and short tips to them will appear in the logs mtw2 folder. This is configured in the launcher.


    now the launcher plays the music file: youneuoy_Data \ music \ m2tweop.mp3

    https://cdn.discordapp.com/attachmen...076052/test.7z

  5. #485
    Lord Baal's Avatar Praefectus
    Join Date
    Apr 2011
    Location
    Republica de Venezuela
    Posts
    6,586

    Default Re: General discussion (use of already implemented functions, etc.)

    With the last two versions I haven't been able to change the start config file from the launcher. After I manually edit it on the config file it starts okay the mods.
    Windows 10 pro 64 bits. Starting the program with admin rights.
    Last edited by Lord Baal; August 13, 2020 at 10:27 PM.
    PROUD TO BE A PESANT. And for the dimwitted, I know how to spell peasant. <== This blue things are links, you click them and magical things (like not ending up like a fool) happens.
    Visit my utterly wall of doom here.
    Do you wanna play SS 6.4 and take your time while at it? Play with my 12 turns per year here.
    Y también quieres jugar Stainless Steel 100% en español? Mira por aca.

  6. #486

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by Lord Baal View Post
    With the last two versions I haven't been able to change the start config file from the launcher. After I manually edit it on the config file it starts okay the mods.
    what you mean? I think it work good:

  7. #487
    Lord Baal's Avatar Praefectus
    Join Date
    Apr 2011
    Location
    Republica de Venezuela
    Posts
    6,586

    Default Re: General discussion (use of already implemented functions, etc.)

    Oh never mind. Somehow got a brainfart and forgot to click (in fact didn't even saw) the apply changes button right down there. It's important to remember to click apply changes on every box. I feel like a moron. Carry on.

    For further illumination I wasn't clicking the one at the top left.



    EDIT: Now I have a different problem that suddenly started. Starting the mod with the program simply crash to desktop, never mind it's all correctly configurated, but if I delete the file runningMod.youneuoycfg on the main MED2 directory, I can start the mod via your program again.

    EDIT 2: I've narrow it down to a number on in the runningMod.youneuoycfg.
    Originally the file created said:
    Code:
    1500
    C:\Program Files (x86)\Steam\steamapps\common\Medieval II Total War\mods\Rage_of_dark_Gods
    I simply deleted the 1500 and the file looks like this
    Code:
    C:\Program Files (x86)\Steam\steamapps\common\Medieval II Total War\mods\Rage_of_dark_Gods
    After this your launcher successfully launched the mod. But if I close your program and open it again the number 1500 is there again, so I have to delete it again. Also this makes the game launch but the tool won't work (ie changes to prices of siege equipment won't apply).

    It's weir because it didn't happen at first (when I manually changed the config file earlier). All I did between this was to verify the games file with steam and then apply the 4gb patch to both executable files (medieval2.exe and kingdoms.exe).

    Another thing, the launcher identifies my copy as a disk version, when is a steam one. Or at least says in the bottom Disk version Kingdoms 1.5.
    Last edited by Lord Baal; August 13, 2020 at 11:27 PM.
    PROUD TO BE A PESANT. And for the dimwitted, I know how to spell peasant. <== This blue things are links, you click them and magical things (like not ending up like a fool) happens.
    Visit my utterly wall of doom here.
    Do you wanna play SS 6.4 and take your time while at it? Play with my 12 turns per year here.
    Y también quieres jugar Stainless Steel 100% en español? Mira por aca.

  8. #488

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by Lord Baal View Post
    After this your launcher successfully launched the mod. But if I close your program and open it again the number 1500 is there again, so I have to delete it again. Also this makes the game launch but the tool won't work (ie changes to prices of siege equipment won't apply).

    It's weir because it didn't happen at first (when I manually changed the config file earlier). All I did between this was to verify the games file with steam and then apply the 4gb patch to both executable files (medieval2.exe and kingdoms.exe).

    Another thing, the launcher identifies my copy as a disk version, when is a steam one. Or at least says in the bottom Disk version Kingdoms 1.5.
    I think you have same problem as franky317:

    The program thinks that you have not a steam version, but a disk version and applies incorrect patches. You just copied and renamed steam .exe?
    You can rename kingdoms.exe back to medieval2.exe. After this try again.


    For more details here:
    https://www.twcenter.net/forums/show...1#post15943212

  9. #489
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,831
    Blog Entries
    23

    Default Re: General discussion (use of already implemented functions, etc.)

    Another thing, the launcher identifies my copy as a disk version, when is a steam one. Or at least says in the bottom Disk version Kingdoms 1.5.
    That's your problem right there - see here (version identification by app)




  10. #490

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by Lord Baal View Post
    I mean about the icons. Most mod icons are named launcher.ico, icon.ico, mod.ico, "modfoldername".ico... you could try to read and load such files, or as generally there will be a single icon file in the folder load the first .ico file it founds in there. If all that fails, then the user then can select it manually.
    Understood, this method seems to me not very reliable. For example, I have such a file in the folder with DaC:

    Spoiler Alert, click show to read: 






    Doesn't look good, does it?




    I think I can add the ability to load the launcher icon from the youneuoy_Data folder. These will be these places:


    Spoiler Alert, click show to read: 







    Gigantus

    Probably more correct options would be to check the size of the file or specific bytes from it. Previous versions of the program checked exactly the version from the file properties, but I don't like this option.

  11. #491
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,831
    Blog Entries
    23

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by youneuoy View Post
    Probably more correct options would be to check the size of the file or specific bytes from it. Previous versions of the program checked exactly the version from the file properties, but I don't like this option.
    Not sure that would work - a good number of users will have applied Large Address Awareness to their executable files which modifies the file.
    Checking for the presence of the steam dll file will be the most definitive indicator.




  12. #492
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,831
    Blog Entries
    23

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by youneuoy View Post
    Probably more correct options would be to check the size of the file or specific bytes from it. Previous versions of the program checked exactly the version from the file properties, but I don't like this option.
    Not sure that would work - a good number of users will have applied Large Address Awareness to their executable files which modifies the file.
    Checking for the presence of the steam dll file will be the most definitive indicator.




  13. #493

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by Gigantus View Post
    Not sure that would work - a good number of users will have applied Large Address Awareness to their executable files which modifies the file.
    Checking for the presence of the steam dll file will be the most definitive indicator.
    Does LAA resize the file? It seems to me that no. I just wrote about checking a part of a file (a few specific bytes at a certain offset) and I liked this idea - I probably will do this. This seems to me the most reliable option.
    That the players will not just think about it, maybe someone will rename kingdoms.exe to medieval2.exe on the steam version of the game, in this case steam_api.dll is unlikely to be a correct indicator.
    Last edited by youneuoy; August 14, 2020 at 12:26 AM.

  14. #494
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,831
    Blog Entries
    23

    Default Re: General discussion (use of already implemented functions, etc.)

    steam_api.dll is a file required to run the steam version's game executable.

    That someone will copy a disk version executable into the Steam installation is illogical, if at all then it would have to be a 'no CD' executable. Which does not make any sense at all. Even the most archaic method of making a mod steam compatible (folder rename method or fixed steam launcher option) does not involve this.

    If there is however a reliable way to look up a mandatory byte section to identify a disk kingdoms executable (as opposed to a copied and renamed Steam medieval2 executable) then I would suggest to go for that. The chance for your scenario is pretty close to zero, not that I would rule it out - it wouldn't be the weirdest I have seen in connection with the game.





  15. #495

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by youneuoy View Post
    now the launcher plays the music file: youneuoy_Data \ music \ m2tweop.mp3

    https://cdn.discordapp.com/attachmen...076052/test.7z
    The link is not the good one or you have forgotten to include the music file i think . I have tried by creating myself a music folder with a m2tweop.mp3, but without result, and i see no parameter that i could activate (unless i am blind?). But the console commands are here.

  16. #496

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by youneuoy View Post
    Does LAA resize the file? It seems to me that no
    As far as iam aware the LAA only changes one bit in the characteristics field of the PE-header. (https://docs.microsoft.com/en-us/win...ebug/pe-format)
    The LargeAdressAware.exe is open source on github, but i doubt the 4gbpatch.exe does something different.

  17. #497
    Lord Baal's Avatar Praefectus
    Join Date
    Apr 2011
    Location
    Republica de Venezuela
    Posts
    6,586

    Default Re: General discussion (use of already implemented functions, etc.)

    It does not, I can attest the file size does not change one bit.

    Also, in steam both medieval2 and kingdoms are the same file now! So renaming is not necessary it seems? I don't remember it being that way, it must be something recent? Anyway, as I wrote, last night made a file checking stuff and the result were two exe exactly the same, just with two different names.

    The surefire way to fix this would be to let the user change the version of the game detected. Sure fix the auto detect but as a final alternative in case everything else fails, let the user use a combobox, list, tickbox or something depending on the number of options to select the version and override any mistakes, maybe in a debug options menu?

    Edit: Told you mi mind was screwy, earlier I just posted after both youneuoy and Gigantus literally explained the solution to my problem and I skipped both times. Sure, deleting or renaming the kingdoms.exe set everything right. the game starts already, but so far it doesnt apply patches. The siege equipment prices doesnt change, its all I have tested so far but is not working.
    Last edited by Lord Baal; August 14, 2020 at 08:25 AM.
    PROUD TO BE A PESANT. And for the dimwitted, I know how to spell peasant. <== This blue things are links, you click them and magical things (like not ending up like a fool) happens.
    Visit my utterly wall of doom here.
    Do you wanna play SS 6.4 and take your time while at it? Play with my 12 turns per year here.
    Y también quieres jugar Stainless Steel 100% en español? Mira por aca.

  18. #498

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by Lord Baal View Post
    It does not, I can attest the file size does not change one bit.

    Also, in steam both medieval2 and kingdoms are the same file now! So renaming is not necessary it seems? I don't remember it being that way, it must be something recent? Anyway, as I wrote, last night made a file checking stuff and the result were two exe exactly the same, just with two different names.

    The surefire way to fix this would be to let the user change the version of the game detected. Sure fix the auto detect but as a final alternative in case everything else fails, let the user use a combobox, list, tickbox or something depending on the number of options to select the version and override any mistakes, maybe in a debug options menu?

    Edit: Told you mi mind was screwy, earlier I just posted after both youneuoy and Gigantus literally explained the solution to my problem and I skipped both times. Sure, deleting or renaming the kingdoms.exe set everything right. the game starts already, but so far it doesnt apply patches. The siege equipment prices doesnt change, its all I have tested so far but is not working.
    Yes, I think you need to add the ability to assign a version and a file yourself.


    Farther:
    Yes, I seem to have incorrectly transferred the function of changing the cost of siege equipment from the .exe file to the .dll file. I'll fix it. With other functions, everything seems to be ok.

  19. #499
    Lord Baal's Avatar Praefectus
    Join Date
    Apr 2011
    Location
    Republica de Venezuela
    Posts
    6,586

    Default Re: General discussion (use of already implemented functions, etc.)

    Okk. I was scared I broked something on my side. And if by chances the only thing that I had time to test is not working I assumed all was wrong! Thanks, I will wait the next version.
    PROUD TO BE A PESANT. And for the dimwitted, I know how to spell peasant. <== This blue things are links, you click them and magical things (like not ending up like a fool) happens.
    Visit my utterly wall of doom here.
    Do you wanna play SS 6.4 and take your time while at it? Play with my 12 turns per year here.
    Y también quieres jugar Stainless Steel 100% en español? Mira por aca.

  20. #500
    franky317's Avatar Libertus
    Join Date
    Jul 2011
    Location
    Rieti, (Ita)
    Posts
    96

    Default Re: General discussion (use of already implemented functions, etc.)

    Quote Originally Posted by youneuoy View Post
    New test version:


    added the ability to unlock all console commands (183 items). If you enable full logging, a file with the names of the commands and short tips to them will appear in the logs mtw2 folder. This is configured in the launcher.


    now the launcher plays the music file: youneuoy_Data \ music \ m2tweop.mp3

    https://cdn.discordapp.com/attachmen...076052/test.7z

    so all console commands work?
    I do not understand....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •