AI mesh tutorial

Users who are viewing this thread

Kritzo said:
I'm afraid i have your lame problem

Are you editing scene 34 "empten" by any chance? You're the first I've heard of someone else with this problem so maybe it's the map. :razz: Then again I haven't been scenemaking for a very long time, haha. I guess all I can suggest is what I've said already: add more impassable features that'll be simple to AI mesh around (like a lake) so you can snag as many spare edges as you can. Also, review your mesh and object placement technique, are there ways you could design your mesh more efficiently to use less edges? That or just power through it and take faces off the map border as needed and hope people don't do too much fighting near the ends of the map. Good luck.
 
I had the same problem in Emptra, right after I clicked "create AI mesh" button, there appeared one or two bugged edges, stretched through all the map. There was no way of removing it, after deletion, the same thing appeared in some other place on the map. New edges on that map were appearing after using extrude operation but they were different from all other edges that were created automatically, I can't remember how exactly, I think it was something wrong with their color. They also never became highlighted when I select them (but I could move them and edit in any other way). So I decided to ignore that and despite all that bugs it seems that mesh worked correctly.
 
I had the same problem with the edges.
By trial and error (like Mortus I guess) I found out that the edges are there and you can use them normally, the problem is that you don't see if you marked them as they don't highlight.
So you can still work with them, you just have to be careful.
 
It's good to know I can still work with them, I just assumed that because I couldn't see them they weren't there and took steps to avoid it happening. :lol: Though, I think I'm going to continue the practice of avoiding the issue anyway, and just put easily replaced faces back when I'm all done, so I have an easier time of editing.
 
Can't access the tools... Whenever I click on Edit Scene Mode nothing happens. You just visit the town without any people around and nothing to do. Am I looking in the wrong place?  :neutral:
 
Chereokee said:
Can't access the tools... Whenever I click on Edit Scene Mode nothing happens. You just visit the town without any people around and nothing to do. Am I looking in the wrong place?  :neutral:
When you enter a scene with "Edit Scene Mode" you only enter a scene without people. To edit you have to enable and activate Edit Mode (For more information go to the linked thread):
wickedshot said:
Setup to be able to edit scenes

Enable Edit Mode:
1. Load up Mount&Blade preloader, choose the Configure option
2. Click the Advanced tab
3. Click the checkbox next to Enable Edit Mode
This will ensure that you're able to use Edit mode ingame (by pressing Ctrl-E at appropriate places)

Use Windowed Mode, you can either do this similar to enabling edit mode:
1. Load up Mount&Blade preloader, choose the Configure option
2. Click the Video tab
3. Click the checkbox next to Start Windowed
And that will ensure your game always starts in window mode, or you can simply press Alt-Enter while ingame.  Windowed mode is necessary to see the Edit Mode menus.
 
Chereokee said:
Cool, now how do I remove the trees already placed in a Scene?
That depends. Some (or all) trees are already part of a scene depending on the terrain code. You can't remove these with the editor, you have to edit the terrain code for that.
Other trees are objects like everything else (mark and press DEL) but I guess you are at an Empt... settlement so you won't have these.

The whole thing belongs to the other thread, on the first page you will find what you can do.
wickedshot said:
To change the basic terrain used, go to the module_scene.py (alternatively you can edit the "scenes.txt" file in the custom settlements folder) file and change the giant number in the:
("custom_settlement_e0m0_Z",sf_generate,"none", "none", (0,0),(240,240),-0.5,"0x0000000026ac8bc30005b168000029fa000069ca00006f69",[],["settle_chest_1"], "outer_terrain_steppe"),
If you want to change the base terrain used, change the "outer_terrain_steppe" to the desired terrain type and use a new terrain code to replace the big "0x0000000026ac8bc30005b168000029fa000069ca00006f69" number (you can generate new codes with the Terrain button in the bottom left corner of the screen while in world map mode.

For all the "custom_settlement_eXmY_Z" scene entries to your new scene number (you can get these scene numbers from the terrain generator on the overland map in the bottom left corner).  Z is the settlement number in the list at the top of the eXmY scenes.

If you just want to remove trees copy the terrain code (like 0x0000000026ac8bc30005b168000029fa000069ca00006f69, start your game and klick the Terrain button. In the following screen press paste and your copied code appears above and the sliders and numbers below are set accordingly. Now move the slider (whatever it's called) to reduce plants and so on. You can create the terrain to check the result until you are satisfied. Now press copy and replace the terrain code in the Scenes.txt file.
After you restart the game you will see the result.
 
Quoting myself from April Third:

"For anybody else who wants to know: Open the scenes.txt for Custom Settlements and start scrolling down, the custom settlement scenes are toward the bottom. Eventually you will see your scene, its name will resemble its scene.sco name. For example here is my entry.

scn_custom_settlement_e0m0_34 custom_settlement_e0m0_34 256 none none 0.000000 0.000000 240.000000 240.000000 -0.500000 0x00000000bc648e500007fa000000717500006e9800002375
  0
  1  598
outer_terrain_plain

See where I bolded and italicised? Change those two characters after b to 00 load up your settlement and viola, no plants!
(though I still wish I could just get rid of the five or six in my way instead of them all, oh well, back to work!)

P.S.
Be sure to make a backup of your scenes.txt file if for whatever reason you should make an error or want your random vegetables back!"

As some clarification for that, I haven't tested that on a code without a "b" as the first character after all those zeros, like "0x0000000026ac8bc30005b168000029fa000069ca00006f69" but I would assume that it works the same way, just skip the "2" and change "6a" to "00"
 
Well, if it wasn't for this tutorial, now i would have 15 settlements where npc's get stuck in walls. :mrgreen:
 
I'm copying this over from my new settlement thread in the hopes that I might get some help on this AI mesh problem;

It seems like I've hit the limit for the number of AI nodes. At least I'm guessing that's what's happened. Every new face I try to create ends up all distorted and stretching across the map - no matter where I make it. As soon as I delete node - any one - it sorts itself out. This is quite a problem, seeing as the AI mesh is still far from complete.

So it looks like I've got two things I can do: Delete as many nodes as I can around the map edges
Or, merge many small nodes into single, larger ones. What I'm unsure about is how large they should be so as not to cause any problems.
I think I remember the nodes would change to a purple colour if you stretched them too much (and if you tried to make a concave shape, I believe) but I'm not at my computer to check this.
 
Well it looks like the stuff I posted above is sorted out. but now I've got another issue.

I've got Entry Point 3 placed in front of my settlement, and Entry Point 4 some way inside. Travellers that arrive at your settlement are supposed to wait at Entry Point 3, and then make their way to 4 when asked to join your settlement.

The problem is, they try to walk in a straight line to 4, completely ignoring the AI mesh. Of course they end up getting stuck in walls along the way.

So why is this happening? My AI companions have no trouble following me and using the AI mesh. Why is it different for travellers?
 
I seem to have a problem.

I created an AI mesh and the AI (in the siege) doesnt follow it. About half of my army goes the route designated by the Mesh, the rest run into walls...

Pics:
http://img98.imageshack.us/img98/4996/mountblade2010021511540.png
http://img651.imageshack.us/img651/2549/mountblade2010021511541.png
http://img682.imageshack.us/img682/2549/mountblade2010021511541.png
 
xGhost4000x said:
I seem to have a problem.

I created an AI mesh and the AI (in the siege) doesnt follow it. About half of my army goes the route designated by the Mesh, the rest run into walls...
I'm not sure why they leave the mesh at all but I know they have problems when they do - though usually I had that problem with cavalry (not good for tight turns). I think you could try one of these two things:
  • add a barrier so they can't leave the mesh.
  • add more mesh in front of the wall so they don't leave the mesh and thus have an easier way to get back to the gate.
    You should make this part of the mesh with smaller parts, possibly narrow strips parallel to the wall.
 
Thanks for the help, I got everyone running through the gate now. It will suck to have to use tricks like that to keep them in the Mesh, if anyone know why they leave it to begin with it would help alot! Thanks!
 
great tutorial, some questions though

how can you "launch" those slaves to test if the ai mesh is correct?

secondly is it posible to edite scenes without been in them (like sieges)

3e is it posible to make a scene from scratch? and use it in the game? if so how?

4e is it posible to make other doors "breakable" and let npc's interact with them?

5e is it posible to make the doors so that npc's seem them as a "wall" where the cannot pass though, or so that the attack it to break it?

6e is it posible to make useable items (think of baskets with arrow's bolts) so your hero can take them to "reload" his ammo?


thanks again for this thread helped me alot!

Korpah
 
korpah said:
how can you "launch" those slaves to test if the ai mesh is correct?
Just get some prisoners into the settlement (just use one of the cheats implemented in the mod) and enter the scene.

korpah said:
secondly is it possible to edit scenes without been in them (like sieges)
No, you have to enter the scene - but how a scene is entered is based on the name. For example when you enter the castle you enter the scene called castle..., if you name a scene that way you will get it.
To test a scene you have to enter it the right way though because otherwise you might trigger the wrong scripts and such.

korpah said:
3e is it possible to make a scene from scratch? and use it in the game? if so how?
Not sure what you mean. You can create a new terrain code by using the terrain button (bottom left) and putting the generated code in the file scenes.txt. Then enter the scene and put your objects there - actually that's what I did with my last two settlements.

korpah said:
4e is it possible to make other doors "breakable" and let npc's interact with them?
5e is it possible to make the doors so that npc's seem them as a "wall" where the cannot pass though, or so that the attack it to break it?
It is possible but I don't know how. If I remember correct wickedshot wanted to look into it.

korpah said:
6e is it possible to make usable items (think of baskets with arrow's bolts) so your hero can take them to "reload" his ammo?
I guess you mean items like those dropped in a battle. I've seen it done (forgot the mod) but I don't know how - otherwise I would already have done it.
As it is already possible with items on a battlefield it's likely you just need to find the right script or such.
 
Back
Top Bottom