To Sea! Mirathei's Sea Battles, Tutorial and files for 1.011

Currently Viewing (Users: 0, Guests: 1)

Mad Skillz

Baron
WBM&BVC
Best answers
0
Excellent! I've been looking at the PoC scripts trying to puzzle this out, hopefully this'll help.
 

ealabor

Baron
WB
Best answers
0
Good job, i've been meaning to get around to extracting these. You've made it much easier.

Thanks
 

Jubal

Knight
WBM&B
Best answers
0
*Waiting to find what he got wrong*

I'm going to add sections on spawning faction navies and so on eventually, but I think I got all the necessary code for the main stuff to work.
 

ealabor

Baron
WB
Best answers
0
With the PoC script, I know that when there were multiple ships in the battle, once you wiped out one of your opponents ship crew, you were pretty much stuck at that point.

I think a good refinement without alot of hassle would be to keep the battles one ship on one ship.

Mira has it set to scale the number of ships in battle based on party size involved, so to emulate this, there could be unmanned ship props in the sea, and this would help sell the effect of a more populous fight, while still using the one on one ship scenario.


Something i'm wondering is if ships can traverse ford tiles?
 

Mad Skillz

Baron
WBM&BVC
Best answers
0
Jubal said:
*Waiting to find what he got wrong*

I'm going to add sections on spawning faction navies and so on eventually, but I think I got all the necessary code for the main stuff to work.
Well, you forgot a few particle systems;
("ship_smoke", psf_billboard_3d|psf_randomize_size,  "prt_mesh_dust_1",
    500, 2, 15, -0.05, 10.0, 0.2,    #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
    (0.1, 0.5), (1, 0),        #alpha keys
    (0.1, 0.:cool:, (1, 0.:cool:,      #red keys
    (0.1, 0.7),(1, 0.7),      #green keys
    (0.1, 0.6), (1, 0.7),      #blue keys
    (0.0, 7.0),  (10, 22.),    #scale keys
    (2.0, 2.0, 5.0),          #emit box size
    (0, 0, 0.5),              #emit velocity
    2,                        #emit dir randomness
    10,                        #rotation speed
    0.1,                      #rotation damping
    ),

    ("ship_shrapnel", psf_randomize_size | psf_randomize_rotation,  "prt_mesh_straw_1",
    5000, 1, 2, 1.5, 10, 2,    #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
    (0.1, 1), (1, 1),          #alpha keys
    (0.1, 0.6), (1, 0.6),      #red keys
    (0.1, 0.5),(1, 0.5),      #green keys
    (0.1, 0.4), (1, 0.4),      #blue keys
    (0.0, 1.5),  (5, 1.5),    #scale keys
    (2.0, 2.0, 5.0),          #emit box size
    (0, 0, 0),                #emit velocity
    2.3,                      #emit dir randomness
    200,                      #rotation speed
    0,                      #rotation damping
    ),
    ("greek_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
    100, 0.35, 0.2, 0.03, 10.0, 0.0,    #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
    (0.5, 0.:cool:, (1, 0),        #alpha keys
    (0.5, 1.0), (1, 0.9),      #red keys
    (0.5, 0.7),(1, 0.3),      #green keys
    (0.5, 0.2), (1, 0.0),      #blue keys
    (0, 1.5),  (4, 3),  #scale keys
    (0.04, 0.04, 0.01),      #emit box size
    (0, 0, 0.5),              #emit velocity
    0.0,                      #emit dir randomness
    200,                      #rotation speed
    0.5                        #rotation damping
    ),
    ("massive_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
    50, 2.0, 0.0, -1.3, 10.0, 0.0,    #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
    (0.5, 0.5), (1, 0),        #alpha keys
    (0.5, 1.0), (1, 0.9),      #red keys
    (0.5, 0.7),(1, 0.3),      #green keys
    (0.5, 0.2), (1, 0.0),      #blue keys
    (0, 4.0),  (1, 10),  #scale keys
    (3.0, 3.0, 0.2),            #emit box size
    (0, 0, 0.4),              #emit velocity
    0.1,                      #emit dir randomness
    250,                      #rotation speed
    0.5                        #rotation damping
    ),

and you left out all the "board the enemy" type strings or whatever, but other than that, it seems to work fine.
 

Mad Skillz

Baron
WBM&BVC
Best answers
0
Also, for anyone who's copy/pasting, the enemy party as the ID listed as "sea_pierats" instead of "sea_pirates". A small, simple typo, but it'll still throw an annoying error.

EDIT: Also, the spawn point in module_parties should have "looter,15,0" instead of "river_pirate,1,0".

EDIT: Oh, nevermind, sea_pierats is correct.
 

Nebless

Veteran
Best answers
0
I was playing around with Jubal's Southern Realm mod which uses this code in it last night and just want to toss some general feedback out for those that are going to use it.

When you first spawn in you do get the multiple ship's which looks nice, a bit confusing since you have no clue which is the real target.  Also all ships look the same 'Viking Longship' which add's to the confusion. 
    -  A target marker or totally different look for the target ships would help.  Near as I could figure currently the target ship always spawns dead ahead of your ship.

Jubal used a 3 position i button = skirmish, board and anchor.  When boarding I only saw 2 styles.  #1 was T-boning the target ship aft of the mast back by the tiller.  #2 was if I had to chase down the target ship and was a 'my bow overlapped targets stern.
    -  Kind of liked the auto steer part but more/better variety in boarding spots would help, like totally along side.

Ship position height: aft the mast by the tiller is under water.  More on your ship than on the enemy's ship.

Both your troops and the enemies do not stay on the ship(s) but can walk on water.  Part of it was from the shoving your troops do, other was when attacking the other ship.  Don't try it yourself as you'll sink.

As been stated above, once you've beaten the first ship you're stuck.  Only way out is to hit TAB, retreat, and go in again.  Might have to do that multiple times for large battles.

NPC position height: Currently can fight from the deck to an enemy standing on top of the water, which puts him inside/below your deck height.

Hope this helps you guys.
 

Kolba

I tried implementing it but after clicking build_module.bat I got following error:

NameError: name 'num_sea_pirate_spawn_points' is not definied
Anyone know what's wrong?

EDIT: Should I add a new constant?


Ok, I fixed it.
Jubal probably forgot about adding one line in module_constants.py. Find following lines and add in bolded line.

num_forest_bandit_spawn_points = 1
num_mountain_bandit_spawn_points = 1
num_steppe_bandit_spawn_points = 1
num_black_khergit_spawn_points = 1
num_sea_raider_spawn_points = 2
num_sea_pirate_spawn_points = 3
 
Best answers
0
Where do I put this?

    ("sail_from_port",[(party_slot_eq,"$current_town",slot_party_type, spt_town),
#                        (party_slot_eq,"$current_town",slot_town_near_shore, 1),
                        ], "Buy a ship (2000 denars)",
      [(assign, "$g_player_icon_state", pis_ship),
      (party_set_flags, "p_main_party", pf_is_ship, 1),
      (troop_remove_gold, "trp_player", 2000),
      (party_get_position, pos1, "p_main_party"),
      (map_get_water_position_around_position, pos2, pos1, 6),
      (party_set_position, "p_main_party", pos2),
      (assign, "$g_main_ship_party", -1),
      (change_screen_return),
      ]),