![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
05-07-13, 09:07 AM
|
#9916 |
|
Black Magic
![]() |
|
|
|
05-07-13, 09:08 AM
|
#9917 |
|
Samurai Navy
![]() |
|
|
|
05-07-13, 09:10 AM
|
#9918 |
|
Black Magic
![]() |
|
|
|
05-07-13, 10:42 AM
|
#9919 | |
|
Ace of the Deep
![]() |
Quote:
![]() ![]() ![]() ![]() ![]()
|
|
|
|
05-07-13, 11:04 AM
|
#9920 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
05-07-13, 12:36 PM
|
#9921 |
|
Torpedoman
![]() Join Date: Feb 2011
Location: Ubooting
Posts: 118
Downloads: 246
Uploads: 0
|
hi , congratulations for the mod , the less i check is really good , but i have some installation troubles maybe , at starting a game , some permanent winwos stay and , are unclosable , map , unsusable , any input is ignored , so ? any help ? i place the mod following the sobers megamod , no way of making it run properly , any help welcome
|
|
|
05-07-13, 01:05 PM
|
#9922 | |
|
Ocean Warrior
![]() |
Quote:
1. your game is not patched to v 1.2 2. corrupted files.. you should use 7zip to extract files and everything will be OK..
__________________
. Where does human stupidity end? . ![]() ![]() El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
|
|
|
05-07-13, 01:11 PM
|
#9923 | |
|
Lieutenant
![]() Join Date: Mar 2010
Location: South Atlantic
Posts: 261
Downloads: 673
Uploads: 2
|
Quote:
After copying all your files, including the new sh.sdl, I still seem to be having the same problem Maybe it's my configuration or something else. The sound won't play, and if I remove the try/except block, I get the same error as before. Now when I use a default sound like Menu.Click or Menu.Periscope.Move in my script it works fine. I've tried renaming the sound to Menu.Warning , make it the same length/bitrate/etc as the ones that played, but I either get the same error or it goes into the except block.
|
|
|
|
05-07-13, 01:12 PM
|
#9924 | |
|
Torpedoman
![]() Join Date: Feb 2011
Location: Ubooting
Posts: 118
Downloads: 246
Uploads: 0
|
Quote:
|
|
|
|
05-07-13, 01:15 PM
|
#9925 | |
|
Ocean Warrior
![]() |
Quote:
__________________
. Where does human stupidity end? . ![]() ![]() El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
|
|
|
05-07-13, 01:30 PM
|
#9926 |
|
Torpedoman
![]() Join Date: Feb 2011
Location: Ubooting
Posts: 118
Downloads: 246
Uploads: 0
|
pretty much apreciated volodya
|
|
|
05-07-13, 04:11 PM
|
#9927 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
05-07-13, 06:36 PM
|
#9928 | |
|
Black Magic
![]() |
Quote:
CPU Disasm Address Hex dump Command Comments 05664C2E |> 8B4424 18 MOV EAX,DWORD PTR SS:[ESP+18] ; Case 3E8 of switch SHSound_act.5664BA9 05664C32 |. 389E 48010000 CMP BYTE PTR DS:[ESI+148],BL 05664C38 |.- 75 08 JNE SHORT SHSound_act.05664C42 05664C3A |. 3BC3 CMP EAX,EBX 05664C3C |.- 0F84 87010000 JE SHSound_act.05664DC9 05664C42 |> 8B4C86 50 MOV ECX,DWORD PTR DS:[EAX*4+ESI+50] 05664C46 |. 3BCB CMP ECX,EBX 05664C48 |.- 0F84 7B010000 JE SHSound_act.05664DC9 05664C4E |. 0FB681 460200 MOVZX EAX,BYTE PTR DS:[ECX+246] what we're looking at is the index of the sound to play is loaded into EAX. EAX is compared to EBX (0). If 0 then sound doesn't exist and the function exits. If sound exists then pointer to the sound is loaded into ECX. Now here's where the error is coming from: the CMP EAX,EBX. The problem is if the game doesn't recognize the sound called for it passes -1 to the function. Comparing -1 to EBX (0) definitely isn't equal so game tries to load pointer from protected memory area and thus error occurs. I'm going to release a patch for this that will have the function fail gracefully if the sound isn't recognized thus preventing the error being thrown. What this means is Menu.PlaySound() only plays sounds that are hard coded in the game - we cannot add new sounds for it
|
|
|
|
05-07-13, 09:34 PM
|
#9929 | |
|
Lieutenant
![]() Join Date: Mar 2010
Location: South Atlantic
Posts: 261
Downloads: 673
Uploads: 2
|
Quote:
That explains it! I wanted to ask you a couple of technical questions. I'm playing around with the menu editor/scripting, trying to learn more stuff, and I wanted to know if any of these are possible: 1 - When I create a button and use its ".Clicked" property, the mouse click event is called when the mouse button is released. Is there a way to get a mouse event as soon as the user presses down the button instead of only when it is released? I've seen dials that do that, but I'm not sure if it's doable with buttons. 2 - I tried to create an EditBox to input some text, but they seem to be limited to 30 characters or something like that. Is there a way to increase this limit? Thanks! |
|
|
|
05-08-13, 01:14 AM
|
#9930 | |
|
Black Magic
![]() |
Quote:
![]() I'm pretty sure there are OnMouseDown and OnMouseUp events from the ScriptManager of the game. Those might not be the exact commands but I know something of the likes exists. The catch, one again, is they only exist for the left mouse button. Nothing exists for the right mouse button or the scroll wheel (or any of the other buttons on the mouse). That is why I wrote my own Mouse wrapper for the game The callbacks thing I spoke about earlier and CTDs will become VERY apparent if you try to write a mouse wrapper. Another problem with writing a mouse wrapper is do you constantly poll for button presses or do you use AutoResetEvents to signify a mouse event happened? If the latter then you will have some difficult problems overcoming CTDs from the callbacks to your python functions (it's doable but it's very tricky! I use AutoResetEvents and a dedicated thread for this)EditBoxes character limit IIRC is 256 or 0xFF (I remember seeing that in the code about them). I've been using EditBoxes for quite some time in my UIs mod and have never had a problem with them only being a limited few number of characters as you describe. They are a strange animal as you'll find out when you try and use them Besides the events InitializeScript, UnloadScript, GameStart, and GameEnd there are some other events you can hook into in the Python scripts. I ran across the available events yesterday while scanning over some of the SH5 code. I book marked that area to come back to later. |
|
|
|
![]() |
| Tags |
| dbrn, favorite, new ui |
|
|
