OSP Code Campaign [WIP] Way of the Sea - water travel -

Users who are viewing this thread

Ramaraunt planned to implement port seiges, but chances are he is done with modding...but what a great feature that would be!
 
cwr said:
Mandible said:
I was also going to mention a point I made back in the old days of this OSP. It might be a good idea to code in neutral landing zones on each landmass so that invading armies don't have to make land in enemy harbors. I could make some simple scene props to demarcate a safe beach or something.
Or an even cooler idea- enemy armies have to beseige your port from sea and take the town in order to land.

At first it could just be the normal siege, but I imagine using some of ruthven's sea battle code could simulate a naval landing... The question is how to deal with reinforcements for the besieger.

That IS a cool idea. Basically just a normal siege except that the siege tower is a ship (or possibly multiple ships)
 
Exactly.

I've tried doing this before actually, not in the context of sea travel/port sieges but in the context of a floating city with only ocean in sight, but I never figured out an efficient way to do reinforcements. I'll try to find the code, its old an buried in endless backup folders, but I remember I basically stole the siege tower/moving ships code, and then tried to use the code to make defenders group up at the top of the ladder make the attackers group up on the ship, and then move the entry point along with the ship at the same speed as the ship... Thats as far as I got though before I gave up and scrapped the idea.

I think there needs to be a better system of reinforcements for port sieges, for gameplay sake though. 60 troops crammed onto a ship and all of them getting killed by arrows before reaching the port, only for the next 60 to be shot as well doesn't seem fun.

It would be a lot more work to code, and I'm just spitballing here: Maybe 4 or 5 troops at a time take small rowing boats into the port from the mothership (where there would be infinite rowing boats) might be a better system of reinforcements for interesting gameplay. (especially if they take different paths into the city) That might make for a fun siege with small skirmishes everywhere with a slight defender advantage, but a constant stream of attackers coming. The mother ship could slowly inch towards the port so the boats take less and less time, until the mothership reaches the port and reinforcements just rush into the port on foot from the mothership.

K5kXe.png
 
Yeah, I was thinking something along the lines of actually making the ship even MORE like a siege tower by having it pull up to the walls and lower a platform. Something like this.

That way, you just make the reinforcement spot be the hold of the ship and everything's fine.

Oh, I see... The ship has moved, therefore the reinforcement point would need to update to reflect the new position... So there would still be some things to iron out.
 
Oh thats a smart idea. There would need to be a new model for the ship I for that though.

Heres the script to move the belfry:
  ("cf_siege_move_belfry",
  [(neq, "$last_belfry_object_pos", slot_scene_belfry_props_begin),
    (entry_point_get_position,pos1,50),
    (entry_point_get_position,pos4,55),
    (get_distance_between_positions, ":total_distance", pos4, pos1),
    (store_current_scene, ":cur_scene"),
    (scene_get_slot, ":first_belfry_object", ":cur_scene", slot_scene_belfry_props_begin),
    (prop_instance_get_position, pos2, ":first_belfry_object"),
    (entry_point_get_position,pos1,"$cur_belfry_pos"),
    (position_transform_position_to_parent, pos3, pos1, pos_belfry_begin),
    (position_transform_position_to_parent, pos5, pos4, pos_belfry_begin),
    (get_distance_between_positions, ":cur_distance", pos2, pos3),
    (get_distance_between_positions, ":distance_left", pos2, pos5),
    (try_begin),
      (le, ":cur_distance", 10),
      (val_add, "$cur_belfry_pos", 1),
      (entry_point_get_position,pos1,"$cur_belfry_pos"),
      (position_transform_position_to_parent, pos3, pos1, pos_belfry_begin),
      (get_distance_between_positions, ":cur_distance", pos2, pos3),
    (try_end),
    (neq, "$cur_belfry_pos", 50),

    (assign, ":base_speed", 20),
    (store_div, ":slow_range", ":total_distance", 60),
    (store_sub, ":distance_moved", ":total_distance", ":distance_left"),

    (try_begin),
      (lt, ":distance_moved", ":slow_range"),
      (store_mul, ":base_speed", ":distance_moved", -60),
      (val_div, ":base_speed", ":slow_range"),
      (val_add, ":base_speed", 80),
    (else_try),
      (lt, ":distance_left", ":slow_range"),
      (store_mul, ":base_speed", ":distance_left", -60),
      (val_div, ":base_speed", ":slow_range"),
      (val_add, ":base_speed", 80),
    (try_end),
    (store_mul, ":belfry_speed", ":cur_distance", ":base_speed"),
    (try_begin),
      (eq, "$belfry_num_men_pushing", 0),
      (assign, ":belfry_speed", 1000000),
    (else_try),
      (val_div, ":belfry_speed", "$belfry_num_men_pushing"),
    (try_end),

    (try_begin),
      (le, "$cur_belfry_pos", 55),
      (init_position, pos3),
      (position_rotate_x, pos3, ":distance_moved"),
      (scene_get_slot, ":base_belfry_object", ":cur_scene", slot_scene_belfry_props_begin),
      (prop_instance_get_position, pos4, ":base_belfry_object"),
      (entry_point_get_position,pos1,"$cur_belfry_pos"),
      (try_for_range, ":i_belfry_object_pos", slot_scene_belfry_props_begin, "$last_belfry_object_pos"),
        (scene_get_slot, ":cur_belfry_object", ":cur_scene", ":i_belfry_object_pos"),
        (try_begin),
          (ge, ":i_belfry_object_pos", "$belfry_rotating_objects_begin"),
          (prop_instance_get_starting_position, pos5, ":base_belfry_object"),
          (prop_instance_get_starting_position, pos6, ":cur_belfry_object"),
          (position_transform_position_to_local, pos7, pos5, pos6),
          (position_transform_position_to_parent, pos5, pos4, pos7),
          (position_transform_position_to_parent, pos6, pos5, pos3),
          (prop_instance_set_position, ":cur_belfry_object", pos6),
        (else_try),
          (assign, ":pos_no", pos_belfry_begin),
          (val_add, ":pos_no", ":i_belfry_object_pos"),
          (val_sub, ":pos_no", slot_scene_belfry_props_begin),
          (position_transform_position_to_parent, pos2, pos1, ":pos_no"),
          (prop_instance_animate_to_position, ":cur_belfry_object", pos2, ":belfry_speed"),
        (try_end),
      (try_end),
    (try_end),
    (gt, "$cur_belfry_pos", 55),
    (assign, "$belfry_positioned", 1),
  ]),

Moving the entry point along with it could be as simple as adding another line of prop_instance_animate_to_position near the end, if we line up the ship exactly so its 0,0,0 coordinates in Blender align with where the entry point would be.
 
Remember you guys can use the Viking Conquest code in Warband mods now, which includes naval assaults for sieges.

Not the ship models rhough, buthe karvi ship from VC (on the right in this pic) is almost exactly the same as the Native Warband ship prop, looks like it was adapted from it.
FlYUj.jpg

So if you limited the code to only using karvi ships then there's a usable resource right there. Tweaking the model wouldn't take much work, and I presume making the simple collision elements wouldn't be hard (never done collision meshes myself so unsure).

No idea if implementing all that is worth your bother though :smile:.
 
I've always been better at the modeling side of things than the coding side, so making a ship with a platform wouldn't be a big deal for me.

Here's a model that I made previously (and unfortunately never got to use) that I quickly edited to add a plank. You are free to use that if you want to have a model to play around with.

siege_ship.jpg


or this smaller one:

small_ship.bmp


What would be REALLY great, would be to have separate scenes based on which ship/ships the attacker is using... One big ship that drops the troops off directly on the wall, or multiple smaller ships (like the one Kraggrim pointed out) that drop the troops on the beach where they then need to advance to the wall and climb ladders.
 
Well, first we'll have to see if the sea travel works out. I used fire and blood's code a while back and it was mightily buggy, and I had no idea where to start with the bugs I was having from it. We'll see if Ramaraunt comes back and gets something going with the zones. That first model of yours looks good though, exactly the sort of thing we would use.
 
I tried, I couldn't come up with a solution sadly. The zones thing was stupidly complicated. I got water travel, mountain passes, and even ferries to cross rivers working beautifully, but the AI wont use them. I'm hardly an expert, mostly a self taught programmer. There has to be someone in the community who knows how to handle AI?

And I stopped modding, got distracted by game maker. But I'm back at it for now at least. One of my friends got me into it again.
 
So I learned how to do A*, and I understand now what is required. It would be a lot of work though.
 
Caravans don't seem to want to use the ports for me. They just run directly towards the coast and get stuck on it forever. Farmers and all other AI uses it just fine and rarely get stuck - and even when they do get stuck, they manage to free themselves after a short bit. Anyone else experience the same?
 
Corbul said:
Sorry to necro:

How do I install this? I don't understand that first part about injecting - inject what? Where? Do I need some extra software for it? :???:
Since I saw you necroing a lot of old threads and asking questions about how to implement them, I would suggest you to implement them all one by one and make sure that they are working properly and not to overload your workflow at once with working on all of them at the same time :wink:
And you need to ask more clear at which parts you have a problem. 'Injecting' here just means you have to add it to the respective places in the module system ^^
 
[Bcw]Btm_Earendil said:
Corbul said:
Sorry to necro:

How do I install this? I don't understand that first part about injecting - inject what? Where? Do I need some extra software for it? :???:
Since I saw you necroing a lot of old threads and asking questions about how to implement them, I would suggest you to implement them all one by one and make sure that they are working properly and not to overload your workflow at once with working on all of them at the same time :wink:
And you need to ask more clear at which parts you have a problem. 'Injecting' here just means you have to add it to the respective places in the module system ^^
Ah, I see.
 
This is my favorite osp. Sea travel with boats is all I wanted. I broke my head all night trying to make it work, just to get to the end of the comments and notice that it was never finished :c sorry to necro
 
well, I tried it, it worked but there are several bugs, but reading the thread I discovered that several happened to it and the solution was not given, although for me I only need the lords to use the boat because they go by sea but on horseback.
Too bad, everything works well, caravans and villagers use the ports and sail by boat ......
No one knows how to fix that?
Thank you
 
Back
Top Bottom