[OSP] Dark Robin's OSPs

Users who are viewing this thread

cwr

There is nothing of value here... The pre_join menu code works but its the simplest thing in the world to do. Don't use the sea travel or the village... They are very bad results of when I just started modding.

Original post:
You can use them without contacting me first, but if you could credit me, that would be great.


These are mainly practices for me to get better at modding; so yeah, the quality may not be the best.

Thanks to Guspav for a fix to my code.
Replace the old "pre_join" menu with this one.

Thanks to Guspav for the fix. :smile:
Code:
(
    "pre_join",0,
    "You come across a battle between {s2} and {s1}. You decide to...",
    "none",
    [
        (str_store_party_name, 1,"$g_encountered_party"),
        (str_store_party_name, 2,"$g_encountered_party_2"),
      ],
    [
      ("pre_join_help_attackers",[
#          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
#          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
#          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
#          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
#          (ge, ":attacker_relation", 0),
#          (lt, ":defender_relation", 0),
          ],
          "Move in to help the {s2}.",[
        (try_begin),
      (eq,"$players_kingdom","$g_encountered_party_faction"),
(assign, "$player_has_homage", 0),
         (call_script, "script_player_leave_faction", 0),
         (assign, "$g_recalculate_ais", 1),
        (try_end),
          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),

         (val_add, ":attacker_relation", 2),
         (val_add, ":defender_relation", -2),
         (call_script, "script_set_player_relation_with_faction",":defender_faction", ":defender_relation"),
         (call_script, "script_set_player_relation_with_faction",":attacker_faction", ":attacker_relation"),
              (select_enemy,0),
              (assign,"$g_enemy_party","$g_encountered_party"),
              (assign,"$g_ally_party","$g_encountered_party_2"),
              (jump_to_menu,"mnu_join_battle")]),
      ("pre_join_help_defenders",[
#          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
#          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
#          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
#          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
#          (ge, ":defender_relation", 0), 
#          (lt, ":attacker_relation", 0), 
          ],
          "Rush to the aid of the {s1}.",[
        (try_begin),
      (eq,"$players_kingdom","$g_encountered_party_faction"),
(assign, "$player_has_homage", 0),
         (call_script, "script_player_leave_faction", 0),
         (assign, "$g_recalculate_ais", 1),
        (try_end),

          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),

         (val_add, ":attacker_relation", -2),
         (val_add, ":defender_relation", 2),
         (call_script, "script_set_player_relation_with_faction",":defender_faction", ":defender_relation"),
         (call_script, "script_set_player_relation_with_faction",":attacker_faction", ":attacker_relation"),
              (select_enemy,1),
              (assign,"$g_enemy_party","$g_encountered_party_2"),
              (assign,"$g_ally_party","$g_encountered_party"),
              (jump_to_menu,"mnu_join_battle")]),
      ("pre_join_leave",[],"Don't get involved.",[(leave_encounter),(change_screen_return)]),
    ]
  ),


For those who are using .txt files for editing:
Paste this:
Code:
menu_pre_join 0 You_come_across_a_battle_between_{s2}_and_{s1}._You_decide_to... none 2 2330 2 1 144115188075856273 2330 2 2 144115188075856786 3
 mno_pre_join_help_attackers  0  Move_in_to_help_the_{s2}.  18 4 0 31 2 144115188075856287 144115188075856787 2133 2 144115188075856066 0 1 2 936748722493063548 0 2133 2 144115188075856069 1 3 0 2204 2 1224979098644774912 144115188075856786 2190 3 1224979098644774913 1224979098644774912 432345564227567637 2204 2 1224979098644774914 144115188075856273 2190 3 1224979098644774915 1224979098644774914 432345564227567637 2110 2 1224979098644774913 -5 2105 2 1224979098644774915 5 1 3 936748722493063444 1224979098644774914 1224979098644774915 1 3 936748722493063444 1224979098644774912 1224979098644774913 1303 1 0 2133 2 144115188075856188 144115188075856273 2133 2 144115188075856189 144115188075856786 2060 1 864691128455135286  .  mno_pre_join_help_defenders  0  Rush_to_the_aid_of_the_{s1}.  18 4 0 31 2 144115188075856287 144115188075856787 2133 2 144115188075856066 0 1 2 936748722493063548 0 2133 2 144115188075856069 1 3 0 2204 2 1224979098644774912 144115188075856786 2190 3 1224979098644774913 1224979098644774912 432345564227567637 2204 2 1224979098644774914 144115188075856273 2190 3 1224979098644774915 1224979098644774914 432345564227567637 2110 2 1224979098644774913 -5 2105 2 1224979098644774915 5 1 3 936748722493063444 1224979098644774914 1224979098644774915 1 3 936748722493063444 1224979098644774912 1224979098644774913 1303 1 1 2133 2 144115188075856188 144115188075856786 2133 2 144115188075856189 144115188075856273 2060 1 864691128455135286  .  mno_pre_join_leave  0  Don't_get_involved.  2 1301 0 2040 0  .
Over this:
Code:
menu_pre_join 0 You_come_across_a_battle_between_{s2}_and_{s1}._You_decide_to... none 2 2330 2 1 144115188075856273 2330 2 2 144115188075856786 3
 mno_pre_join_help_attackers  6 2204 2 1224979098644774912 144115188075856786 2190 3 1224979098644774913 1224979098644774912 432345564227567630 2204 2 1224979098644774914 144115188075856273 2190 3 1224979098644774915 1224979098644774914 432345564227567630 30 2 1224979098644774913 0 2147483678 2 1224979098644774915 0  Move_in_to_help_the_{s2}.  4 1303 1 0 2133 2 144115188075856188 144115188075856273 2133 2 144115188075856189 144115188075856786 2060 1 864691128455135282  .  mno_pre_join_help_defenders  6 2204 2 1224979098644774912 144115188075856786 2190 3 1224979098644774913 1224979098644774912 432345564227567630 2204 2 1224979098644774914 144115188075856273 2190 3 1224979098644774915 1224979098644774914 432345564227567630 30 2 1224979098644774915 0 2147483678 2 1224979098644774913 0  Rush_to_the_aid_of_the_{s1}.  4 1303 1 1 2133 2 144115188075856188 144115188075856786 2133 2 144115188075856189 144115188075856273 2060 1 864691128455135282  .  mno_pre_join_leave  0  Don't_get_involved.  2 1301 0 2040 0  .

Note that editing .txt files is a really bad idea, this is just for if you can't set up the module system, which you really should be able to set up.

I have made a new map in Thorgrim's Map Editor which allows the player to travel by sea. :smile:

I have made two changes:

1) The first is to change terrain under bridge map icons, so if you want map icons to change during sea travel, it won't effect bridges. It won't harm gameplay in any way, its just a bug fix for if you want your map icon to change during sea travel.

2) Second, and more importantly, you can now travel by sea by using this map. I have tried to make the routes as efficient as possible, so hopefully the AI will use all routes of sea travel.


Download - 1.9 Mb

To install: Simply replace your old map.txt with this one. :smile:

To make map icons change during sea travel, paste this code into module_simple_triggers, over the original "# Updating player icon in every frame" code:

The original code for this was made by GoldEagleMNE, here.
Code:
  # Updating player icon in every frame
  (0, [
  	(try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
		(troop_get_slot, ":party", ":kingdom_hero", slot_troop_leaded_party),
		(troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
		(party_get_current_terrain, ":terrain", ":party"),
		(try_begin),
			(eq, ":terrain", rt_bridge),
			(party_set_icon, ":party", "icon_ship"),
		(else_try),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_flagbearer_a"),
		(try_end),
	(try_end),
	
(troop_get_inventory_slot, ":cur_horse", "trp_player", 8), #horse slot
(party_get_current_terrain, ":terrain", "p_main_party"),
    (assign, ":new_icon", "icon_player"),
    (try_begin),
      (eq, "$g_player_icon_state", pis_normal),
      (try_begin),
       (eq, ":terrain", rt_bridge),
       (assign, ":new_icon", "icon_ship"),
      (else_try),
        (ge, ":cur_horse", 0),
        (assign, ":new_icon", "icon_player_horseman"),
      (else_try),
      (party_get_num_companion_stacks, ":num_stacks","p_main_party"),
      (assign, ":num_men", 0),
      (try_for_range, ":i_stack", 1, ":num_stacks"),
        (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"),
        (try_begin),
          (troop_is_hero, ":stack_troop"),
          (val_add, ":num_men", 1), #it was 3 in "Mount&Blade", now it is 1 in Warband
        (else_try),
          (party_stack_get_size, ":stack_size","p_main_party",":i_stack"),
          (val_add, ":num_men", ":stack_size"),
        (try_end),
        (gt, ":num_men", 8),
        (assign, ":new_icon", "icon_player_with_party"),
      (try_end),
    (else_try),
      (eq, "$g_player_icon_state", pis_camping),
      (assign, ":new_icon", "icon_camp"),
    (else_try),
      (eq, "$g_player_icon_state", pis_ship),
      (assign, ":new_icon", "icon_ship"),
    (try_end),
    (neq, ":new_icon", "$g_player_party_icon"),
    (assign, "$g_player_party_icon", ":new_icon"),
    (party_set_icon, "p_main_party", ":new_icon"),
  ]),

This code causes map lag! Use at your own risk! I will make a better code soon!

That code assumes you are using this. (Made by CBWarDog)

To use that, do not use CBWarDog's code, instead, add this to the end of module_map_icons:
Code:
  ("player_with_party",0,"uwplayer", avatar_scale, snd_footstep_grass, 0.15, 0.173, 0),

You also need to move the .brf made by CBWarDog into your resource folder.


To get rid of the problem of the bridge terrain showing on the map, follow swyter's fix:
Swyter said:
Copy the material
Code:
map_ocean
and duplicate it, call it
Code:
map_bridge
and delete or rename the original. That should work.
In the module system, the material number 7;
Code:
rt_ford
, is called
Code:
rt_bridge
. Proof here, from my map editor, cartographer.

Here's the complete list of hardcoded map materials called by the engine as of now, in case any of you need them for some reason:

Code:
map_reverse_foam
map_foam
map_shore
map_bridge
map_mountain_forest
map_river
map_desert
map_snow
map_steppe
map_plain
map_mountain
map_ocean

I have made a scene for a village. Its nothing special, it's basically for me to practice with making AI meshes.


It is ready to be put into a game, just code in an extra village. :smile:


Download - 66 Kb

Terrain code: 0x00000001300389800003a4ea000058340000637a0000399b


Screenshots of the village: (my screenshots are inside of multiplayer, so you can't see any villagers, but it has all the necessary entry points, and an ai mesh :smile:)
F41972383575643B52B6D2A0FF44995089FCB83A


D80A09735E0D1D4B5AB03F1A53B1043DDFB82D18


4261B839ADD7CC60C397A62D6B63A3EEF208983A


4FAF800A35284F6DDE58598779636A3A34875666

I am using Doma_'s cinematic compilation for those screenshots, if you aren't using that mod, it will look different. :smile:



Thank you to Hiner for your awesome video tutorial that got me started scening. :smile:
 
You want people to credit you for a map that any half-wit can make, old and stupid code that I given to you (You didn't even credit me.:razz:), a village scene that just has some houses on it without the al mesh or entry points (I don't see villagers anywhere or village elder.) ? Its nothing personal just seems kind of stupid.  :razz:
 
GoldEagleMNE said:
You want people to credit you for a map that any half-wit can make, old and stupid code that I given to you (You didn't even credit me.:razz:), a village scene that just has some houses on it without the al mesh or entry points (I don't see villagers anywhere or village elder.) ? Its nothing personal just seems kind of stupid.  :razz:
I think this sounds rude, though he is right.
Maybe someone will find use for this, though I do not think so.

anyway good luck, if you decide to add more :razz:
 
I'm now going to respond to some of the replies:


GoldEagleMNE said:
You want people to credit you
As with any other OSP in the world. :roll:


GoldEagleMNE said:
for a map that any half-wit can make,
It took me while to get Thorgrim's map editor to stop crashing, so this could help someone who has that problem. :smile:


GoldEagleMNE said:
old and stupid code that I given to you (You didn't even credit me.:razz:),
Well, I provided a link to your post where you gave the code, so that is a form of crediting you. I'll add that that code was made by you, though. :smile:

My OSP is the map that includes ford terrain on the water, not the code. :smile:


GoldEagleMNE said:
a village scene that just has some houses on it without the al mesh or entry points (I don't see villagers anywhere or village elder.)
Actually, it has an AI mesh AND entry points, but I was too lazy to test it inside an actual village. So, it has all the necessary entry points, and an untested AI mesh that may, or may not work. So, it will work in-game as a village, I just tested in inside of the multi player scene, thats why I was the only one there. :smile:

EDIT: I tested the AI mesh, it works.


Cernunos said:
Thanks a lot for OSPing these :smile:
You're very welcome. :smile:


Dion/Folcwar said:
I think this sounds rude, though he is right.
Maybe someone will find use for this, though I do not think so.
Well if no one finds use for this, then so be it. If someone wants to use it, then they can go ahead. :smile:


Dion/Folcwar said:
anyway good luck, if you decide to add more :razz:
I definitely plan to. :smile:
 
1.Well calling these a osp is like calling a tutorial a code and demanding credit for a tutorial like you've done here. I guess this happens when 13 year old boy makes a OSP or a tutorial:razz:
2.Bloodpass is better for changing map textures for warband and it doesnt crash.:razz:
3. Well there you are right. You don't need to add me in this OSP.:razz: I could give you a updated and a lot better sea travel code but I won't.  :smile:
4.Okey then :smile:
 
Don't get me wrong, but I don't know if this is worth releasing as OSP (not trying to sound rude, but just suggesting). However, since you are expanding your pack, good luck  :wink:
 
GoldEagleMNE said:
1.Well calling these a osp is like calling a tutorial a code and demanding credit for a tutorial like you've done here. I guess this happens when 13 year old boy makes a OSP or a tutorial :razz:
I'm not asking for credit in that tutorial, I did at first ask for credit, then realized that adding troops is not something that is very advanced, so I'm not asking for credit with that tutorial. The village scene has all the necessary entry points and I have AI meshed it, but I haven't tested the AI mesh. Nonetheless, it will function perfectly in-game as a village. :smile:

And just because I'm 13 I can't make tutorials or OSPs? If you don't want to use it, don't.


GoldEagleMNE said:
2.Bloodpass is better for changing map textures for warband and it doesnt crash. :razz:
I haven't gotten Bloodpass to work for me yet, so I'm using Thorgrim's.


GoldEagleMNE said:
3. Well there you are right. You don't need to add me in this OSP.:razz: I could give you a updated and a lot better sea travel code but I won't.  :smile:
Because why...? :???:

I have done nothing to insult you. You said I didn't provide credit, but I provided a link to your post, which is your post, so people would know it was you. I have now added that you made the code, but I never claimed to have made that code anyway.

But if you don't want to give the code to me, thats fine, its your choice, just don't act like I've wronged you, and thats why your not giving it to me.


Something unusual said:
Don't get me wrong, but I don't know if this is worth releasing as OSP (not trying to sound rude, but just suggesting). However, since you are expanding your pack, good luck  :wink:
Yep, I'll be expanding my pack. :smile:
 
All i will say is .. http://forums.taleworlds.com/index.php/topic,256381.msg6146531.html#msg6146531

Your not quite as good as you think you are Goldeagle, maybe you should cut the kid some slack.
 
8 months ago he couldnt even change a towns faction which would be self explanatory to most, yet hes being patronising and bullying a 13 year old kid. No need..
 
That was 10 months ago and I was beginner to modding, what of it? I am not being harsh or bullying a 13 year old kid, I am even helping him make a better code for water travel:razz:
 
GoldEagleMNE said:
That was 10 months ago and I was beginner to modding, what of it? I am not being harsh or bullying a 13 year old kid, I am even helping him make a better code for water travel:razz:

Then i appologise.
 
produno said:
All i will say is .. http://forums.taleworlds.com/index.php/topic,256381.msg6146531.html#msg6146531
Yeah slap everyone's amateur era's mistakes to their face.Thats what we came here , arent we?
He probably an amateur at this time and If you are an amateur you can ask help because Its a "forum".

Cwr want to help other modders by making OSP's , Its really a good way to think and help others but Its not an OSP at all.If he want to release an OSP , he should make his own codes and he should spend much time on that.

 
Well on that part, cwr is trying. My only suggestion for you cwr is that you should've worked on more items. Some original codes you made 100% yourself, maybe some items, a whole scene pack for an era you choose. It needs a lot more things, the scene isn't specific or hard to make, the code is based upon Eagle's. But if you have the motivation and skills, keep doing it, present some quality work in a month or two. Cannot say "Elementary" just yet.
 
I PMed GoldEagle, so we're cool now. :smile:


This pack is, and will be for a long time, a WIP, because I will keep adding more to it. :smile:


As for items, I can't model or texture very well, (even compared to my coding and sceneing skills) so that will probably not happen, sorry. :???:

edit: changed scenting to scening, I hate auto correct! :evil:
 
Back
Top Bottom