SP Native A place to call home...

Users who are viewing this thread

Elias_Maluco

Regular
HOUSE MINI-MOD, version 0.3

Tired of sleeping on dirty inns and having no place to call my own, I
decided to try to add a house for me in the game. This is started out as just a research to find out how to add new scenes to the game and access then, but it become a simple mini-mod with some higher pretentions. My objective is to add a fully functional house to the game.

What I done so far:

- Created a house, with some basic furniture, and added it to Rivacheg.

- Placed the chest on the house.

- Placed a new NPC in the house, Mona, the house maid.

- The player can rest in the house, for free, by talking to Mona.

To-do list:

- Make the house sellable. Instead of being avaliable from the start, the house will be for sale and it will only be accessible after being bought by the player (I dont know how could I do that yet).

- Pehu Wizzard said he is going to try to make a stable, a place where the player could store horses.

- I plan to add some kind of barracks were the player could store troops.

- I will try to add some other function to the maid.

- Im acepting suggestions.

SCREENSHOTS:

On Zendar:



On Rivacheg:



Inside:



Mona:



DOWNLOAD:

The module with source (530 kbytes):

http://zupload.com/download.php?file=getfile&filepath=33116
 
By "process_scenes.py" you mean "module_scenes.py", obviously. :wink:

Looks like maybe you need that second part of the Zendar Center to look like this:
Code:
["the_happy_boar","","zendar_merchant","house"],[]),
Since it has that empty reference in there originally. Then set the house passage to variation #4.
If that doesn't work... <shrug>
I've successfully linked a new SCO file through the arena dialog, but haven't messed with passages, so this is just a guess.
 
Hey, I did it! Well, almost. But the house is acessible now! Here is what I did:

- Instead of addind "house" to that list, which seens to have no effect, I just changed "zendar merchant" to "house". Like that:

Code:
  ("zendar_center",0,"sargoth_square", "bo_sargoth_square", (-40,-40),(21,13),-100,"0",
    ["the_happy_boar","","house"],[]),

Now, the door that used to lead to the merchant, leads to my house. The passage object assigned to 2, however, still leads to the Zendar merchant.
Conclusion: when we edit the acessible scenes in "module_scenes", we are not actually changing the scenes that are acessible through "passage" objects, but the doors. Those doors, unfortunatelly, have no selectable "passage" object on then, so we cant change its location.

So the only way (that I found, of course) to have access to new scenes from Zendar, is using those existing doors. You dont lose access to the inn or the merchant by doing that since you can use "passage" n° 1 and 2 to access those places.

The proof:

The house from outside:


From the inside (just like the merchant, but without the merchant: I still have to decorate my place):


Now Im going to try adding or linking my scene from other towns.
 
Im making some progress here, if anyone is interested. Now Im moved my house to Rivacheg, and that was very easy. All I had to do was find "rivacheg" on "module_game_menus.py" and add this line to the list of options:

Code:
      ("house",[],"Go to your house",[[set_jump_mission,"mt_town_default"],
                                                       [jump_to_scene,"scn_house"],
                                                       [change_screen_mission]]),

Build the module and:



And it works perfectlly: I click the option, I go to my house.

Also, I added some furniture and stuff to my hole. Still poor, but at least is mine:

 
At least you got some wine there, lol.
Nice work. Maybe it would be cool if we could by that house on Zendar, and if houses on other places could be given as rewards for side-related or merchant-related quests.
 
I think some kind of bed would be a necessary pice of furniture. For sleeping, I reckon.

Unfortunatelly, there is no kind of bed avaliable on the edit mode, so I guess I will have to use one of those woden benches.

Nice work. Maybe it would be cool if we could buy that house on Zendar, and if houses on other places could be given as rewards for side-related or merchant-related quests.

I will try to implement that in the future. The house will be for sale at the start of the game and will only become avaliable after the player buy it. But right now, I have no idea on how to implement that (or if its possible).

I moved the chest to my house (now that I have my own place, I dont need to leave my stuff at the inn) and now I will try to find a way to be able to actually rest on it.
 
You can make a bed using existing materials, check the Project Detail Props to see how they've done it.

http://forums.taleworlds.com/viewtopic.php?t=4630

(In portuguese)
Agora é que vi que és brasileiro, eu sou tuga. :grin:
Nesse mod acima podes tirar boas ideias.
 
Temos uma boa comunidade que fala português e gosta de Mount&Blade.

Brasileiro falando aqui. Prazer dablade.

Grandes descobertas, Elias.

Back to english

When I get home, I will try to mess around with the passage objects, and see what I can learn about it. I'm almost sure that armagan would've made a way to do that.
 
I'm trying it, Elias, but I'm having troubles.

What does the overall code look like for just replacing the merchant in Zendar?

Or, if you can't recreate/remember it, then what's the overall code (just in the module_scenes.py file) look like?


Edit: For what it's worth, I went ahead and deleted the zendar_merchant reference in modules_scenes.py, and I was still able to go in there, and Prescan was still there (can't find my house though :evil: ).
 
props my friend props, and to all you modders out there, all this stuff just goes over my head and i download the finished projects lol, good luck, wish i could help, but i cannot
 
I'm trying it, Elias, but I'm having troubles.

What does the overall code look like for just replacing the merchant in Zendar?

Or, if you can't recreate/remember it, then what's the overall code (just in the module_scenes.py file) look like?

Ok, then, here is an step-by-step guide on how to add a scene to the game, accessible trough Zendar or any menu-driven town:

CREATING THE SCENE AND ADDING A REFERENCE TO IT:

#1 - Create your scene .sco file by copying another sco from SceObj folder. For this guide, I will create a copy of "scn_zendar_merchant.sco" and rename it to "scn_house.sco".

#2 - Open "modules_scenes.py" and create a copy of another scene line and then rename it to match your new scene´s name. I will copy the line:

Code:
  ("rivacheg_merchant",sf_indoors, "thirsty_lion", "bo_thirsty_lion", (-100,-100),(100,100),-100,"0",
    ["exit"],[]),

(it could be any other) and then change it to:

Code:
  ("house",sf_indoors,"thirsty_lion", "bo_thirsty_lion", (-100,-100),(100,100),-100,"0",
    ["exit"],[]),

The first word in this line is the name of the scene and have to match the name you gave to the .sco file without the prefix "scn_", which is added when you build the module. Since my sco file is called "scn_house.sco", I have to use "house" has the scene´s name. If I have to reference this scene from any other file, like "module_troops.py", for example, I have to use the complete name, "scn_house", not just "house".

MAKING THE SCENE ACCESSIBLE:

A) From Zendar:

#3: Find this line on "module_scenes":

Code:
  ("zendar_center",0,"sargoth_square", "bo_sargoth_square", (-40,-40),(21,13),-100,"0",
    ["the_happy_boar","","zendar_merchant"],[]),

and change "the_happy_board" or "zendar_merchant" to the name of your scene. Like this:

Code:
  ("zendar_center",0,"sargoth_square", "bo_sargoth_square", (-40,-40),(21,13),-100,"0",
    ["the_happy_boar","","house"],[]),

Important: this will not change what scenes are accessible trough "PASSAGE" objects in Zendar, will only change what scenes are accessible trough the doors of Zendar. If you replace "zendar_merchant", the door that used to lead to the merchant will now lead to your scene. The merchant, however, is still accessible trough a "PASSAGE" object assigned to the number 2 (if you replace the merchant, you dont need to add a passage object to it, since Zendar already have one at the next door after the merchant door).

4# Find the line of your scene and change "exit" to "zendar_center". Like this:

Code:
  ("house",sf_indoors,"thirsty_lion", "bo_thirsty_lion", (-100,-100),(100,100),-100,"0",
    ["zendar_center"],[]),

B) From any menu-driven town:

#3 - Open "modules_game_menus.py" and find the city where you want to add your scene. Each town has its own menu block. I will add it to Rivacheg, so I find this block:

Code:
    "rivacheg",0,
    "You enter the Vaegir town of Rivacheg.",
    "none",
    [[reset_price_rates],[set_price_rate_for_item,"itm_dried_meat",60],[set_price_rate_for_item,"itm_oil",130]],
    [
      ("rivacheg_castle",[],"Go to the Count's castle.",[[set_jump_mission,"mt_town_default"],
                                                       [jump_to_scene,"scn_rivacheg_castle"],
                                                       [change_screen_mission]]),
      ("rivacheg_tavern",[],"Visit the tavern.",[[set_jump_mission,"mt_town_default"],
                                                       [jump_to_scene,"scn_willows_kitchen"],

      ("rivacheg_smithy",[],"Visit the smithy.",[[set_jump_mission,"mt_town_default"],
                                                       [jump_to_scene,"scn_rivacheg_smithy"],
                                                       [change_screen_mission]]),
      ("rivacheg_merchant",[],"Speak with the Merchant.",[[set_jump_mission,"mt_town_default"],
                                                       [jump_to_scene,"scn_rivacheg_merchant"],
                                                       [change_screen_mission]]),
      ("rivacheg_leave",[],"Leave town.",[[leave_encounter],[change_screen_return]]),
    ]
  ),

#4 Now, make a copy of any other option and change its name, the text will want to appear on the game and the scene to load. I made a copy of this line:

Code:
      ("rivacheg_tavern",[],"Visit the tavern.",[[set_jump_mission,"mt_town_default"],
                                                       [jump_to_scene,"scn_willows_kitchen"],
                                                       [change_screen_mission]]),

and changed it to:

Code:
      ("house",[],"Go to your house.",[[set_jump_mission,"mt_town_default"],
                                                       [jump_to_scene,"scn_house"],
                                                       [change_screen_mission]]),

And thats all.
 
Would it be possible to add some kind of troop commander, who can look after troops you're not currently using? So you could take out the raiders with a party of knights, then go home and pick up your man hunters to capture that pesky noble.
 
Would it be possible to add some kind of troop commander, who can look after troops you're not currently using? So you could take out the raiders with a party of knights, then go home and pick up your man hunters to capture that pesky noble.

That would be great. Ive added your suggestion to my "to-do list" and I will try to find a way to make it possible.
 
Alright, I did exactly what you said, and I had done exactly what you said before and after you posted the guide (which I'm sure is very helpful to many people, and I thank you for taking the time to make it :wink: ), and it still didn't work.
After making the changes to the module_scenes.py file, you're supposed to save it, and then click 'build_module.bat', right?

Like I said, I copied what you had, and checked it (literally) around ten times, and it still didn't work. However, when I downloaded your module, it worked fine.
Now, I'm trying to learn from your success, so I tried to change the scene from the thirsty lion tavern template to the template used for the happy boar tavern in Zendar ("small_tavern" and "bo_small_tavern") so that I could have a fireplace, and when I saved the file and built the module, and went into the game, it was still the same template room as before. What did I do wrong?


At any rate, thanks for the guide, and I hope you keep it up--good luck. :smile:
 
Stonewll382, are you sure you are building it correctlly? Did you created a folder for you mod, and changed "modules_info"? If you dont, follow this:

http://forums.taleworlds.com/viewtopic.php?t=5408

Or else I have no idea on why it doest not works.
 
Yeah, I don't know what the problem is. I guess I'll have to reinstall, or at least pay more attention to the build_module.bat DOS screen.

Mm, thanks for the suggestion. :sad:
 
Back
Top Bottom