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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-07-10, 06:22 AM   #11
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

This is from a technical PM. I encourage you ask your questions on the forum, rather than on PMs because
1. the others will also see the answer and may benefit from it
2. it's a better use of my time, because people have similar questions so I don't have to write the same answer multiple times. Plus I may forget some details on the 3rd time I answer the same question. And I can answer more distinct questions in the same time rather than answering the same questions over and over.
3. I have subscribed to this thread so I receive emails when you ask something. So it's just like a PM, only better

Quote:
Some questions about entries in the page .ini files:

what are the possible values for these and what do they do?

Color=0xFFFFFF00 (ARGB or RGBA or ?)
Materials=1 (# of materials - associated with Mat x?)
Display=0;No stretch - what are all possible values here and what do they do
Mat 0=data/menu/gui/layout/dialsfdb.dds - figured this one out
MatFlags=0x9 - what are all possible values here and what do they do
TexFmt=0x0 - what are all possible values here and what do they do
Drag=false - item is draggable?
BmpState=1 - what are all the possible values are what do they do?
NeedFocus=true - purpose is?
SelOne=false - ??
IdGroup=0 - ??
StatesColors=0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF - what are the different states? What does each value above represent?


how can I debug scripts in real time? When I have the game loaded I can run the script manager and see my scripts. But how can I change them, save them, and have the game reload them while playing the game (thus testing changes)?
Hello

* Please stop changing the ini files by hand. That was the only way to create UI mods for SH4. Now we have given you the Menu Editor. Use it.
* the colors use the RGBA format
* matflags: 1 for transparency and 8 for bilinear filtering
* MatFlags=0x29 is 0x20 + 0x08 + 0x01. I don't know by heart what 0x20 means, i'll have to look into the DirectX headers. But it's not a value you normally encounter.
* menus use a system that resembles the CSS used in web development, e.g. you create a set of appearance properties (specific for texts, buttons, listboxes) and apply that style for any number of menu items. So StatesColors should usualy be set by means of style sheets (from the Menu Editor). As a bonus, style sheets can be changes while the game is running (very useful for list-boxes that only get filled with content at run-time, e.g. the Combat Log in the bottom right corner of the HUD). The style sheets themselves are stored in the Silent Hunter 5\data\Menu\StyleSheets\German.shss file.
* the FocusableMenuItem (button, check box, radio button) has 4 states: Disabled, Normal, Mouse Over, Pressed. So those are the colors for the 4 states.
* Drag, BmpState, NeedFocus, SelOne - were used in SH3 and are now obsolete (and hard-coded). The SH5 way is to use python scripting to implement your design (good examples can be found in scripts we wrote for the HUD, Navigation map and the Character dialog (the big .py files in data\Scripts\Menu)).

* While on patrol, open the script manager and click on a script from the tree on the left. Do your changes to the script code you see on the right and press the ApplyChanges button. That's it.
* There's a button called ViewGlobals to let you see the variables that the script is working with and see the exposed properties for those variables.
* The script manager has some useful features like text-auto-complete, jump-to-function-definition, find-text and go-to-line-number.
* Also, there's a tab called Class Definitions to see all the classes exported to the python scripts containing the inheritance tree, description, nested types, properties, methods and events.

Mihai
__________________
Kilroy was here

Last edited by maerean_m; 03-07-10 at 09:06 AM. Reason: spelling
maerean_m is offline   Reply With Quote
 

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 08:25 AM.


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.