![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Silent Hunter
![]() Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
|
![]()
I want to make AI submarines and insert them ingame, can anyone post a tutorial on how to do that in here please ?
I never fiddled with that side of the game... thanks keltos |
![]() |
![]() |
![]() |
#2 | |
Admiral
![]() Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
|
![]() Quote:
Peabody
__________________
System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2. |
|
![]() |
![]() |
![]() |
#3 |
Rear Admiral
![]() |
![]()
Most importantly, you must remove all nodes and equpiment that is also used by the player. So you'll need to clone the equpiment remap the ID's and rename the nodes too. The game has issues with trying to instantiate nodes and equipment if its in use by both the AI and the player at the same time. You'll see weird things happen , like all dials in the control room stuck in the 12 O clock position. The kick in the jimmy is this wont happen all the time - shennaingans only manifest themselves when the game tries to render the AI sub. If the player doesn't get close enough to the AI sub for the game to render it, you'll never see the problem until way later.
Also, don't forget the smaller, lesser used nodes too. Like a TAR node for instance. That one kicked me in the crotch. edit: (I find myself wondering if i renamed the CT and deck gun nodes or not now. ![]() |
![]() |
![]() |
![]() |
#4 |
Weps
![]() Join Date: Sep 2005
Posts: 359
Downloads: 43
Uploads: 0
|
![]()
Actually you don't need to make it a ship .... if you do, when you spot / detect it, you get the wrong message i.e. "enemy warship spotted" or whatever.
I've made a whole collection of AI subs for TSWSM (for many different depths basically) and it's quite easy. 1) Clone an existing sub model and make sure you do the remap Id's thingy in S3D. When I say clone .... I mean clone and make sure the new unit is in /data/submarine. 2) You can delete all files in the cloned subs folder apart from the textures and the .dat .sim .val .eqp .sns .dsd and .zon. The other files (UPC etc) are only needed for human controllable sub. 3) Open the cloned subs .sim file and delete the nodes cmd_aihumansub and specialabilitiesctrl. 4) Open an AI ship file and copy a cmd_aiship node and past into the new cloned subs file or add the controller manually if you are that competent with S4d. Important - LEAVE the unit submarine definition in the .sim file. 5) replace the contents of the .cfg file in the submarines folder with something like this. i.e. strip out all the human playable content ... you only need this stuff really; [Unit] ClassName=AI_Uboat7c_7 UnitType=202 MaxSpeed=17.0 MaxSpeedSubmerged=7.6 Length=67.4 Width=5.3 Draft=7 Displacement=1500 RenownAwarded=200 6) Now setup a new roster file in the \data\roster\country\submarine like this, but modify the appropriate values (name, folder etc. [UnitClass] ClassName=AI_Uboat7c_7 UnitType=202;102 AppearanceDate=19391130 DisappearanceDate=19451227 DisplayName=U Boat [Texture 1] TextureName=data/Submarine/AI_Uboat7c_7/AI_Uboat7c_7_T01.tga LightmapTextureName=data/Submarine/AI_Uboat7c_7/AI_Uboat7c_7_O01.tga NormalmapTextureName=data/Submarine/AI_Uboat7c_7/AI_Uboat7c_7_N01.tga StartDate=19380101 EndDate=19451231 Frequency=1 [Unit 1] Name=U239 DOC=19391130 DOD=19411122 Note how the classname match in the etnires at the top of the roster cfg file and the submarine.cfg file. Also I tend to use folders which match the classname. Also not the unit type is 202 (anything 2xx is a submarine). This is what causes the game to say "submarine spotted" and also makes the game look in the data\submarine and data\roster\countryname\submarine folders for the relevant files. I wrote this from memory so may have forgotten something. Give it a try and let me know. If you want to make the Ai submarine more agressive, you will need to make it a ship (different from above) ..... but if so, let me know and I'll reply with instructions. Good luck. |
![]() |
![]() |
![]() |
#5 |
Weps
![]() Join Date: Sep 2005
Posts: 359
Downloads: 43
Uploads: 0
|
![]()
Damn .... almost forgot..... let me know if the sub you want AI controlled is to be cloned from a sub which uses a unitpart. conning tower, or if the conning tower is included in the core .dat.
This makes a bit of a difference, dependant on if you have any surfaced used weapons you want it to use. If so, you have to iopen the conning tower object and paste it into the main subs .dat and do a littel re-naming of A01 nodes etc to allow guns to be mounted. Also forgot to add, set the sub up to work on the surface and if you want it submerged, do that later once everything is as required and just change the surfaced draft in the .sim to the depth you want it to have. |
![]() |
![]() |
![]() |
#6 |
Silent Hunter
![]() Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
|
![]()
got it working somehow
but no tower ? my tower is in the Objects\Turm_AIClass600 keltos |
![]() |
![]() |
![]() |
#7 |
Weps
![]() Join Date: Sep 2005
Posts: 359
Downloads: 43
Uploads: 0
|
![]()
Add the tower to the main submarine .dat file and don't forget to add the textures it uses also. You will then need to rename the A01 A02 nodes etc ... the ones in the human playable version don't allow equipment to be mounted for an AI ship.
|
![]() |
![]() |
![]() |
#8 |
Silent Hunter
![]() Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
|
![]()
so a separate tower as for the playable subs doesn't work right ?
also : how do I include it in a campaign (wdad not to mention it) ? thanks keltos |
![]() |
![]() |
![]() |
#9 |
Silent Hunter
![]() Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
|
![]()
I used Lurker's PTvirtualtorpedo on board my Adua AI sub..
gosh that hurt ! did you ever take a look at it polyfiller ? it's in Library\guns_torp.dat and .sim linked to shell_torp.dat which is a 21 inch shell and has the zon value of a torpedo with hitpoints from 120 -180 ap 100 radius 7-10 I would like to see the torpedo.. maybe we can add its model somehow ? we don't see the torp coming but the explosion is tremendous ! sank me with 2 hits... keltos Last edited by keltos01; 01-25-11 at 02:34 PM. |
![]() |
![]() |
![]() |
#10 | |
Admiral
![]() Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
|
![]() Quote:
So I agree the game will see it as a sub, but to make it work as AI you must make it a ship. So it is the same as a 'Destroyer" is an aiship, a sub that works as AI is also an 'aiship'. That is what I meant by making it a ship. Peabody
__________________
System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2. |
|
![]() |
![]() |
![]() |
#11 |
Silent Hunter
![]() Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
|
![]()
Here goes the first workable version :
![]() ![]() 3d model by JU_88 and Ref of GWX 3.0 for SHIII Italian 600 Class Adua submarine (AI) my only problem is the single mission I ship with the mod : everytime I try it it's night, even though I changed the starttime with the editor and saved the mission. I don't have a clue here, peabody help ! here is the workable version of my AI Adua submarine for WDAD : http://www.mediafire.com/file/44py5w...Adua%20v1.1.7z as she uses Lurker's PTvirtualtorpedo from WDAD instead of a DG she only works with WDAD, beware of incoming torpedoes ! also : I had set another submerged sub around but even when you spot the periscope at 1000 y you can't lock... sank it with asdic angle and range ![]() hope you like it keltos |
![]() |
![]() |
![]() |
#12 | |
Admiral
![]() Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
|
![]() Quote:
You have two missions installed, I assume you are talking about the "Italian Sub" mission? If so, it is set to start at night. [Mission] MissionType=0 MissionDataType=0 MultiMissionType=0 Year=1944 Month=11 Day=17 Hour=21 Minute=30 Even your mission briefing states: "It is 2130 on November 17th 1944", that is night. (9:30 PM) So you say it always starts at night, it is set to start at night, so I don't understand the problem, unless you meant it always starts in the daytime. If you want it to start in the daytime, you need to change the time in the "Mission/Parameters" menu not in the sub's start time. Peabody
__________________
System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2. Last edited by peabody; 01-26-11 at 03:54 PM. |
|
![]() |
![]() |
![]() |
#13 |
Silent Hunter
![]() Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
|
![]()
thanks peabody !!
keltos |
![]() |
![]() |
![]() |
|
|