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-09-11, 12:04 PM   #61
d3vnu11
Bosun
 
Join Date: Feb 2011
Posts: 66
Downloads: 95
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
a string buffer in Python can only hold x amount of characters. I've found a solution to this though. We define multiple AIText= entries where each AIText is a paragraph of text.
We have to also define an [AdditionalInfoEnd] header after all the AITexts.

I've also fixed the formatting problem when images are embedded into the text.
I'm not exactly sure how the Python interpreter was embedded into SH5 or what data types sh5 defines that you can access or even how much of the python api was included. But couldn't you simply extend the String Buffer class to suit your needs ? Or even define a new class to tailor it to what you are trying for ?
Regards,
Kevin
d3vnu11 is offline   Reply With Quote
Old 03-09-11, 02:35 PM   #62
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Update for the AIT files:-

[AdditionalInfo]
AIText=The <b>Liberty</b> ships etc
[AdditionalInfoEnd]

This will now show as this:-

The Liberty ships etc

commands are still:-

| = new line "return"
| | = new para
AIT= =start new para with text limit reset.

do not use ";" in your text
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 03-09-11, 03:25 PM   #63
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Trevally. View Post
Update for the AIT files:-

[AdditionalInfo]
AIText=The <b>Liberty</b> ships etc
[AdditionalInfoEnd]

This will now show as this:-

The Liberty ships etc

commands are still:-

| = new line "return"
| | = new para
AIT= =start new para with text limit reset.

do not use ";" in your text
not AIT= but rather AIText=
Every new AIText= defines a new paragraph of text
A leading ; on a line is a comment and will be ignored. This can be used to insert comments into your .ait file.
TheDarkWraith is offline   Reply With Quote
Old 03-09-11, 03:27 PM   #64
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Magnum View Post
Also waiting for TDW to finish the Library app and debug the clipping text in SOAN.
The clipping of text was fixed in test version 9
TheDarkWraith is offline   Reply With Quote
Old 03-09-11, 03:55 PM   #65
Zedi
Sea Lord
 
Join Date: Mar 2010
Posts: 1,845
Downloads: 184
Uploads: 2
Default

Quote:
Originally Posted by TheDarkWraith View Post
The clipping of text was fixed in test version 9
If so, there is need to use the AIText for new paragraph?
Zedi is offline   Reply With Quote
Old 03-09-11, 04:09 PM   #66
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Magnum View Post
If so, there is need to use the AIText for new paragraph?
Yes. i.e.:

; paragraph 1
AIText=......
; paragraph 2
AIText=.....
; paragraph 3
AIText=....
.....
TheDarkWraith is offline   Reply With Quote
Old 03-10-11, 06:41 AM   #67
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

@TDW

UI test9 for SOAN

Full text is now being displayed
Bold text is working

Images are not showing up. The NLL test image does not show either
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 03-10-11, 08:15 AM   #68
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Trevally. View Post
@TDW

UI test9 for SOAN

Full text is now being displayed
Bold text is working

Images are not showing up. The NLL test image does not show either
NLL test image works fine for me. All I did was remove the leading ; from the entry in the NLL.ait file. How were you trying it?
TheDarkWraith is offline   Reply With Quote
Old 03-10-11, 08:22 AM   #69
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Here is the AIT file from test9:-

Quote:
[AdditionalInfo]
AIText=2,718 built by 17 shipyards located along the Atlantic, Pacific and Gulf coasts. Highest number (385) were built by <b>Bethlehem-Fairfield Shipyards, Inc.</b> in Baltimore.| |
AIText=| |<img>180,70,c:\\games\\Ubisoft\\Silent Hunter 5\\data\\Menu\\Gui\\Tutorial Images\\TutorialImage_Test2.dds</img>| |
AIText=The Liberty ships are between 400 and 450 feet long (120 - 140 m) and 56 feet (17.3 m) wide. They use a 2,500 horsepower steam engine to push them through the water at 11 knots at a range of 23,000 miles (37,000 km). Liberty ships have five cargo holds, three forward of the engine room and two aft (in the rear portion of the ship). Each could carry 10,800 deadweight tons (the weight of cargo a ship can carry) or 4,380 net tons (the amount of space available for cargo and passengers).| |
AIText=The crew quarters are located amidships (the middle portion of the ship). Crew consist of between 38 and 62 civilian merchant sailors, and 21 to 40 naval personnel to operate defensive guns and communications equipment.| |
AIText=The first of these new ships was launched on September 27, 1941. Based on a British design, modified by the United States Maritime Commission to conform to American construction practices and to make it even quicker and cheaper to build. The US version was designated 'EC2-S-C1': 'EC' for Emergency Cargo, '2' for a ship between 400 and 450 feet (120 and 140 m) long (Load Waterline Length), 'S' for steam engines, and 'C1' for design C1.
[AdditionalInfoEnd]
Sorry, I can't see the ;

The ones I am trying from the ranger ait look like this :-

AIText=| |<img>300,193,c:\\games\\Ubisoft\\Silent Hunter 5\\data\\Menu\\Gui\\Tutorial Images\\grayrangerw.dds</img>| |
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 03-10-11, 08:28 AM   #70
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Trevally. View Post
Here is the AIT file from test9:-

Sorry, I can't see the ;

The ones I am trying from the ranger ait look like this :-

AIText=| |<img>300,193,c:\\games\\Ubisoft\\Silent Hunter 5\\data\\Menu\\Gui\\Tutorial Images\\grayrangerw.dds</img>| |
that's the incorrect .ait file for NLL. Try downloading test version 9 from post #1 again. The NLL.ait file should have 4 to 5 commented out lines at the beginning of it describing the ait file system and how to use it:

; defines the additional info displayed for this vessel
; to define bold text wrap the text in <b> and </b> tags
; images to be embedded into the additional info text are to be placed in '\data\menu\gui\Additional info sea images' folder
; maximum image size is 404 x 256
; to imbed images in the text add the <img> and </img> tags. Note: width and height are defined in the image tags. i.e. <img>200,65,test_embedded_image_1.dds</img>
TheDarkWraith is offline   Reply With Quote
Old 03-10-11, 08:32 AM   #71
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by TheDarkWraith View Post
that's the incorrect .ait file for NLL. Try downloading test version 9 from post #1 again. The NLL.ait file should have 4 to 5 commented out lines at the beginning of it describing the ait file system and how to use it:

; defines the additional info displayed for this vessel
; to define bold text wrap the text in <b> and </b> tags
; images to be embedded into the additional info text are to be placed in '\data\menu\gui\Additional info sea images' folder
; maximum image size is 404 x 256
; to imbed images in the text add the <img> and </img> tags. Note: width and height are defined in the image tags. i.e. <img>200,65,test_embedded_image_1.dds</img>
Thanks TDW, that looks more like what I expected to see
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 03-10-11, 08:40 AM   #72
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Just downloaded test9 again and here is the ait file for the NLL

Quote:
; defines the additional info displayed for this vessel
; to define bold text wrap the text in <b> and </b> tags
; to imbed images in the text add the <img> and </img> tags. Note: width and height are defined in the image tags. i.e. <img>200,65,c:\\games\\Ubisoft\\Silent Hunter 5\\data\\Menu\\Gui\\Tutorial Images\\TutorialImage_Test2.dds</img>
Still the same
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 03-10-11, 08:53 AM   #73
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Trevally. View Post
Just downloaded test9 again and here is the ait file for the NLL

Still the same
yes, just had one of those duh moments

I made the changes for test version 10 which I haven't put up yet. I'll send you and Magnum copies of it (where it is now).
TheDarkWraith is offline   Reply With Quote
Old 03-10-11, 09:00 AM   #74
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by TheDarkWraith View Post
yes, just had one of those duh moments

I made the changes for test version 10 which I haven't put up yet. I'll send you and Magnum copies of it (where it is now).
Thanks
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 03-10-11, 11:52 AM   #75
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Ok, that all the features for the SOAN working.







So im now ready to push on and finish the oilers.

@ Magnum, I can do the troop ships and linners too.

Anyone up for the escorts I can help
__________________
Trevally Mods for SH5
Trevally. 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 03:42 PM.


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