SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-11-10, 05:50 PM   #61
sergei
Sea Lord
 
Join Date: May 2008
Location: London UK
Posts: 1,788
Downloads: 405
Uploads: 29
Default

Quote:
Originally Posted by voidster View Post
So far i cant get to work properly. Ive pointed the goblin editor where my actor dll's are (my main sh5 directory ) and when i try to load up the sim file for editing ..it informs me it cannot find many actor dll's and refuses to load.
Yep, I got that problem too. Pointed it at my SH5 folder, can open the GR2 file ok, but when I try and merge the sim, zon etc. files I still get the missing actors dialog.
sergei is offline   Reply With Quote
Old 03-11-10, 06:02 PM   #62
piri_reis
Seasoned Skipper
 
Join Date: Aug 2005
Location: Istanbul, Turkiye
Posts: 715
Downloads: 115
Uploads: 0
Default

Quote:
Originally Posted by sergei View Post
Yep, I got that problem too. Pointed it at my SH5 folder, can open the GR2 file ok, but when I try and merge the sim, zon etc. files I still get the missing actors dialog.
You should highlight and open both files at the same time
NSS_Uboat7a.GR2 and NSS_Uboat7a.sim

also merging works alright on my side
__________________

Lt.z.S. Barbaros Hayreddin, U-35, 2nd Flot/Kiel, Type VIIB
Oct.29.1939, 2nd Patrol Eastern English Waters
Running SH5/TWOS
piri_reis is offline   Reply With Quote
Old 03-11-10, 06:19 PM   #63
voidster
Watch
 
Join Date: Jul 2007
Posts: 25
Downloads: 10
Uploads: 0
Default

Quote:
Originally Posted by piri_reis View Post
You should highlight and open both files at the same time
NSS_Uboat7a.GR2 and NSS_Uboat7a.sim

also merging works alright on my side
just tried that, it fails to load the dll still.
voidster is offline   Reply With Quote
Old 03-11-10, 07:11 PM   #64
piri_reis
Seasoned Skipper
 
Join Date: Aug 2005
Location: Istanbul, Turkiye
Posts: 715
Downloads: 115
Uploads: 0
Default

Quote:
Originally Posted by voidster View Post
just tried that, it fails to load the dll still.
and you got actors_directory and root_folder set properly..
In that case it's weird
__________________

Lt.z.S. Barbaros Hayreddin, U-35, 2nd Flot/Kiel, Type VIIB
Oct.29.1939, 2nd Patrol Eastern English Waters
Running SH5/TWOS
piri_reis is offline   Reply With Quote
Old 03-11-10, 07:54 PM   #65
voidster
Watch
 
Join Date: Jul 2007
Posts: 25
Downloads: 10
Uploads: 0
Default

Quote:
Originally Posted by piri_reis View Post
and you got actors_directory and root_folder set properly..
In that case it's weird
LOL ok i get the darwin award today. i didnt notice there were two directorys to set manually. I just saw the root folder option not the one way up top for actors.

now maybe i can figure out how to edit the stats heheh thanks for putting up with my chaos.

edit: ..ahh..much easier than hex editing. Now ive got to figure out how to add about 100 more torpedo reserves *evil grin*

Last edited by voidster; 03-11-10 at 08:32 PM.
voidster is offline   Reply With Quote
Old 03-11-10, 09:26 PM   #66
Punkedit
Watch
 
Join Date: Mar 2010
Posts: 15
Downloads: 1
Uploads: 0
Default

How do you set the two files?
Punkedit is offline   Reply With Quote
Old 03-11-10, 11:15 PM   #67
voidster
Watch
 
Join Date: Jul 2007
Posts: 25
Downloads: 10
Uploads: 0
Default

Quote:
Originally Posted by Punkedit View Post
How do you set the two files?
its listed in the tutorial, but its kind of buried..at least thats my pov.

you launch the editor, then click tools then options. From there you need to type in the location where your SH5.exe is located for the "Actors Directory" (should be the first blank area) then down at the bottom of the first menu you type in the same location info for the "root directory" (in my case it was D:\sh5 but i always install to diff directorys.)

it has a lot of potential but the learning curve is going to rank up there with Lightwave. Hmm i may have to tinker around and see if i can import stuff from LW, might be cool to put some of my modeling skills to use. ..er anyhow. hope that helps.
voidster is offline   Reply With Quote
Old 03-12-10, 12:38 AM   #68
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith
I'm trying to implement AOB, Range, Speed, and Heading dials for the UZO and periscope and have ran into a ro*******. See here: http://www.subsim.com/radioroom/show...&postcount=352

What I can't get are the dials to accept commands. When I click on them or try to rotate the dial or hand it does nothing. I noticed that the application is controlling the dials though - heading moves when I move my periscope or uzo, range doesn't seem to be working quite right, speed registers nothing even when I lock onto a target. AOB works correctly as the application is controlling it.
Now what I want to do is to take manual control of these dials and input my solution into them. This is what I can't get to work. I've done this before in SH3/4, it was a snap, but I think the TAI or this new 'arcade' style solution is screwing it all up. I don't like the current way the game computes the solution for me. I want to have to track the ship and figure out it's speed, couse, AOB, etc. and manually input them into the TDC for a firing solution. Is this possible?

Here's a link to my files for this if you would be so inclined to have a look: http://www.filefront.com/15805903/Ol...DarkWraith.7z/


TheDarkWraith
I've looked in the archive and I can give you a big hint: python scripts only use tabs as indentation at the beginning of the line. Any spaces in that part make the script to behave unpredictably. That's why is very advisable to use the game's Script Manager. And most of all because of the word-auto-complete feature that is also aware of the game's SDK (exported classes, enums, properties, methods and events).
Copying python scripts from the forum is one cause for all the very bad spaces.

Now back to your mod:
The TDC page is still in the game (100% intact), you can see it the Menu Editor too. Just create an "empty" script (like the one in "Page obs periscope.py") with the same name of the ini file (Page TDC.py for Page TDC.ini) and you'll the have full access to all the menu items in the TDC page.
And from the Menu.PageActivated you hook on (+=) in every periscope's script you can bring that page on screen for the player.

Code:
#Page obs periscope.py
from menu import *
def InitializeScript():
	Menu.PageActivated += Menu_PageActivated
	Menu.PageDeactivated += Menu_PageDeactivated
def UnloadScript():
	Menu.PageActivated -= Menu_PageActivated
	Menu.PageDeactivated -= Menu_PageDeactivated
def Menu_PageActivated( page ):
	if page == Pageobsperiscope:
		from PageTDC import PageTDC
		PageTDC.Visible = True
def Menu_PageDeactivated( page ):
	if page == Pageobsperiscope:
		from PageTDC import PageTDC
		PageTDC.Visible = False
And you do the same for the attack periscope and the UZO.

Remember, copying python scripts from the forum is one cause for all the very bad spaces. Make sure you replace the spaces with tabs.


Also, you can also bring back the notebook:
__________________
Kilroy was here
maerean_m is offline   Reply With Quote
Old 03-12-10, 12:50 AM   #69
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Is there a way to get the goblin editor to give you the x,y,z coodinates of a position on a loaded 3D model? Like below, I loaded up the VIIa sub and I'm trying to get the coordinates of the center of the exhaust port. I move my mouse over the exhaust port but don't see any coordinates showing anywhere.

TheDarkWraith is offline   Reply With Quote
Old 03-12-10, 12:50 AM   #70
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

Also, copying the menu items what comprise a dial in the Menu Editor is not enough (those are just bitmaps). You have to create a new dial entry for it (in data\Menu\cfg\Dials.cfg).

And there's a restriction, you can't add dials to a menu page that didn't have any dials in the stock version of the game (because there has to be a specific line of C++ code for that menu page).
__________________
Kilroy was here
maerean_m is offline   Reply With Quote
Old 03-12-10, 01:11 AM   #71
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith
ah, so trying to add them to the UZO won't work because of the restriction right? got it. So by importing them into the UZO or periscope they will work? Do I understand this correctly?
Page UZO already has dials inside the Solution group (ID=0x28030000), so you can add dials to the UZO page.

My message is that the correct way to add the TDC dials in the periscope pages is to actually just show the TDC page to the player (with the script I gave you just a few minutes ago). So if you add a dial by hand to one of the periscope page, you'll have to do it all over again in the other 2 (attack, observation, UZO).

And since the layout I saw in the screenshot is different from the one currently in the game, all you have to do is to move the dials around in the Menu Editor.

That's all and is that easy.
Mihai
__________________
Kilroy was here
maerean_m is offline   Reply With Quote
Old 03-12-10, 01:15 AM   #72
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Racerboy View Post
Is there a way to get the goblin editor to give you the x,y,z coodinates of a position on a loaded 3D model? Like below, I loaded up the VIIa sub and I'm trying to get the coordinates of the center of the exhaust port. I move my mouse over the exhaust port but don't see any coordinates showing anywhere.
picture of GoblinEditor
Handling 3D coordinates by hand is a very bad practice. The correct way is to have a dummy 3D object (and maybe attach controllers to it).
__________________
Kilroy was here
maerean_m is offline   Reply With Quote
Old 03-12-10, 01:16 AM   #73
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith
Quote:
Originally Posted by maerean_m
Quote:
Originally Posted by TheDarkWraith
ah, so trying to add them to the UZO won't work because of the restriction right? got it. So by importing them into the UZO or periscope they will work? Do I understand this correctly?
See here
thanks. I'm trying to import them into the UZO currently but it's not working. Throwing some 'debug code' (ala MessageBox.Show()) to see if the functions to show the TDC page are getting called or not.
Use ScriptManagerManaged.ShowPythonError("") instead of MessageBox.Show()
__________________
Kilroy was here
maerean_m is offline   Reply With Quote
Old 03-12-10, 01:27 AM   #74
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by maerean_m View Post
Handling 3D coordinates by hand is a very bad practice. The correct way is to have a dummy 3D object (and maybe attach controllers to it).
The reason I was looking for the 3D coords is to attach a FastParticleGen controller to that exact location (sub exhaust).
explain what you mean by a dummy 3D object. I've seen these before in SH3/4 but never really understood what they were for.
TheDarkWraith is offline   Reply With Quote
Old 03-12-10, 01:54 AM   #75
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith
Quote:
Originally Posted by maerean_m
You haven't created the Page TDC.py . That file translates in the module the error is talking about.

And yes, there is a glitch in the Matrix. The script for menu pages are initialized when they are made visible for the first time. So you won't catch the first PageActivated. The solution is to call Menu_PageActivated( PageUZO ) as the last line in InitializeScript.
thanks maerean_m. I got it working now! I hadn't created a Page TDC.py like you said. Now how do I give the imported page a higher Z order priority (I want it on top of everything in the page that imported it)? Since I imported it does it fall under the hierarchy of the page that imported it (i.e. Page UZO imports Page TDC...does heirarchy look like this: PageUZO_PageTDC_XXXX?
The import keyword in python only imports the Globals from that script into your script so you can call those globals by their name. It has nothing to do with anything else.

The Z order is the one from the tree you see in the menu editor. If you want to bring a page closer to the player, drag it down in that tree. The Z order is saved in data\Menu\Pages\menu_1024_768.ini (so you include that file too in your mod).

The menu items also have methods for the z-order: MakeSureIsBehindOfZOrder, MakeSureInFrontOfZOrder, SendToBackZOrder and BringToFrontZOrder. BringToFrontZOrder must NOT be used on menu pages (will cause BIG bugs).

Mihai
__________________
Kilroy was here
maerean_m is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.