Jump to content

AI package questions


TheHavok

Recommended Posts

S'up, guys

 

I've been messing around with the CS, trying to add NPCs and things to other things, trying to get people to do some things 'n' stuff. It happens that one of my test subjects is suffering from a little stupidity (i.e. suffering from my own stupidity).

 

The AI package I gave him is copied from another NPC who does it right. The only things I changed were the locations (different bed, different table, different room). My issue is that the dumb thing doesn't go to the spot where he's supposed to stand guard. He tries to get there, but instead of using the route that would allow him to get to the marker, he goes bellow. In other words, he's supposed to guard the top of a tower and instead he's running against the bottom of the tower, like if the marker was put inside the tower and not on top of if (which needless to say I checked out).

 

So, any thoughts? Should I just bring him to the backyard and put one to his head or there is yet hope to the apparently lobotomised thing?

Link to comment
Share on other sites

Does the NPC have access to the top of the tower? There needs to be a way for it to reach the top, as he cannot fly. If it is just a normal castle stone tower, you can, for example, place a castle door at the botton of the tower and a hatch at the top and link them so that NPC will use the doors and go on the top of the tower. Also make sure you have navmesh built correctly both on the ground and on top of the tower so that the NPC will know where it is allowed to walk and where not, which might also solve the issue with running against the botton of the tower.
Link to comment
Share on other sites

I believe there is also a problem with NPCs finding things not on the same level as them (Z axis). If the tower is your creation make the top room a separate cell and give him a package to travel to that cell.

 

Where you will run into trouble with that advice is if he is supposed to guard the top of the tower (i.e. outside on the top of the structure). Then the marker will be in the Tamriel worldspace ... not sure what would help him then (maybe something like bounding boxes ... at least I think that's what they are called).

 

Another thought if that is the case is a travel package to the room directly below the marker and then another to the marker. When he is outside the tower at ground level he's in the Tamriel worldspace and your package directs him to a marker also in the Tamriel worldspace. The game isn't bright enoungh to take him out of the Tamriel worldspace into te tower cells to get to the mark.

Link to comment
Share on other sites

Thanks guys. Dumb NPCs being dumb...

 

It turns out that the NPC can actually get there. Yet if I follow him from his room, he'll sometimes take the wrong route. Why this is I have no idea. This only happens when I follow him, so I'll ignore it. If it becomes a problem I guess I'll create a patrol route ending up at his post to ensure that he takes the right route.

I have another issue now. I changed the AI package of two NPCs. They were suppose to be in another place, but they stay at the same place. The other ones work fine. I reviewed the AI package time and time again and there is no error. I am assuming this is the result of not using a clean save while testing the changes made to the mode, something that is too complicated for me to do. I'll try wait a few in game days for it to update. If not, I'll delete those two guards and create other two from scratch.

 

While I'm at it, I have two questions that maybe someone will be able to point out:


First: If I was to be interested in building a large place, that would grow and expand with bought upgrades, in a matter similar to what happens with player bought houses and DLC, how could I do it? I'm assuming I'd have to script the hell out of it. While I possess some respectable building qualities in the CS, I can't script for crap. Even simple scripts tend to require a long time for me to use them.

I'm trying to create a huge citadel, maybe a small city, that would expand over time, as the player expends more money and completes quests, ending up in a large place, with a huge military force (hired and equipped by the player), that would be constantly under attack by bandits, marauders, and later, daedra. Needless to say that this will probably require scripting capabilities beyond mine.

 

 

The second question is: how can I do something in the CS so that specific NPCs share their inventory with me, allowing me to give them equipment?

Link to comment
Share on other sites

There should not be any need to delete and remake the guards. Just check their packages once more. The order of the packages 'on' the NPC, conditions of the packages, locations, times, types, targets, etc. And use the "evp" (EvaluatePackage) command to make them evaluate their packages in-game if they somehow get stuck. Maybe waiting the three days could also help. But no need to delete and remake the NPCs unless you really want to start with a 'clean' one and not spend time searching for the problem - assuming, of course, that it lies within the NPC and not AI packages.

 

And here is what I think I know regarding those questions (should someone know better, please correct me):

 

Question 1: Yes, it would require scripting, but not too much if you have everything placed ready and just need to enable the new things upon specific events. So you would need to build it ready and then make it so that the things supposed to appear are linked to one reference (the enable parent thing, see CS wiki). You would also need to link path points, so that you can disable parts of the path grid thingy when buildings appear. More on that on the CS wiki, too. Then you would just need to enable or disable the appropriate references and linked path points. It would require some scripting, but building the thing in CS would be the greatest challenge. And about DLC way of doing 'building'... Battlehorn Castle, for example, has two sets of furniture for the areas: one for the old stuff with broken things and spider webs, one for the new stuff with everything proper. Both are linked to an xmarker, for example all taxidermy area furniture, new and old, is linked to one xmarker (enable parent thing). The xmarker is disabled by default, the new furniture follows its enable state and the old furniture is set to the opposite enable state. So when player buys an upgrade, the xmarker is disabled and, because of the enable parent thing, old furniture is disabled and new enabled. You would, if you enable whole buildings and doors and whatnot, need to also link path points and use either DisableLinkedPathPoints or EnableLinkedPathPoints on the path nodes' enable parent.

 

Question 2: You cannot make that in the CS by clicking a button. You will need a container used for that purpose only, a way to have an NPC equip items after all has been unequipped, a script to move items from the NPC to container or vice versa and somehow use "Activate Player 0" on the container for player to open it while the NPCs items are in it. Skyrim has the inventory management feature built in, but Oblivion does not have one (and even the original, simple and restricted 'follower management systems' are per-NPC). So you will need to use the 'extra container' sort of trick to 'access' the follower's inventory. That will require a bit of scripting, but it should not be overly complicated. If you decide to use the RemoveAllItems command, see the CS wiki page for it and then make sure your NPCs do not have the amount of -1 of any item.

 

Hopefully that helps a little. :)

 

Edit: Ha! Found a typo. Now there is one typo less here than there were a few minutes ago. :)

Edited by PhilippePetain
Link to comment
Share on other sites

Thank you for the answers, Philippe. I'm studying the help pages and will try to do a few testes in the next days.

 

I wanted to create a mod. A city mod. Not anything huge, but a settlement, near the ocean or a big river, with a port. Something that would begin as a big mass of land purchased by the player. Then the quests would follow, allowing the player to build up a castle and walls. Eventually, staff would be needed. And as they were growing, guards and soldiers for the walls would also be welcome. Commerce would kick in, as well as sea trading, generating some revenue. And this would allow for improvements on the castle and infrastructures of the settlement. Then there would come raiders attacks and all that. Not to mention this would take several months in game, as well as a few million gold (no one can convince me that building up city walls and a castle would cost less than a few millions). I'm thinking about 50 to 70 NPCs in all.

 

While I've been experimenting enough to build all this, there's one problem: I'm not remotely versed in scripting to the point of actually pull many of these goals of. In time I might do some of them. But it would go very slowly. Perhaps someone out there who's versed in scripting would like to lend a hand and share credit. I just like to build things. Very much so.

Link to comment
Share on other sites

I just love scripting in Oblivion, but building gets frustrating. I might be able to lend you a hand, but I have so many projects of my own currently. Or maybe not. One is just about finished and a castle mod of mine should be finished by Christmas. Then I have a sort of patch to try and make, a bit complicated one. But I can postpone another project of mine that is not too essential and will also take forever to finish. And then I have some small interesting things to do for two mods by other people to see if I could help them somehow.

 

The project sounds very interesting. I had planned something like that for Battlehorn Castle myself, a small city, but just building the castle is driving me nuts - and it is not even ready yet. If you do the building work for the village in the CS, it should be veeery easy to find someone do the scripting for you, as it should not be too difficult to do. Depending on the features, of course... :)

 

Just one thing is... umm... I am not sure how TES4LODGen would... work. The buildings will be either visible from a distance or hidden from a distance. All of them. I think. Unless it is somehow possible to tick and untick the 'visible when distant' flag using scripts and also make the LOD react to the changes. So the visible when distant things would be handy to check if you plan to have all buildings absent by default and then build the city piece by piece.

 

Also, what do you mean by help file? Is there a help file in the CS? I never noticed that if there is. There is the Construction Set Wiki that I have used. :P

Link to comment
Share on other sites

Hey, if you need a hand with building, quid pro quo. I usually hear people complain that scripting and AI, to those who know how to do it, it's pretty quick and straightforward. My experience with HTML and PHP also points that way. But building... There's no quick way to do it.

 

My initial idea was to build this settlement beyond the barriers of Cyrodiil. On the west bank of Brena river. That way the mod would be completely conflict free and the landscape is just beautiful and near the ocean. As for the quests, I might even voice act some things. That's no big issue. The thing is that the settlement would need to grow slowly, as buildings would be constructed after specific trigger. That's my problem. If you believe that it's doable, hell, I just need to know where to start. Would I need the complete built version of the city before all the scripting? Finally, the LOD Gen, it wouldn't be much of a problem, since if this mod would stay at the bank of the river, it would be too far for players to see it. It can wait, specially because the walls would be among the last things built.

 

As for Battlehorn, there's already a few mods, so I think a new city/settlement might be more engaging. Specially because the BH quest itself limits what can be done in the mod.

 

Oh, by help files I meant the wiki. There's no help in the CS, only chaos, misery and suffering. I think Bethesda spent more time getting the CS to work than building the game itself...

 

So, if you need any help building, by all means, I'll gladly lend a hand.

Link to comment
Share on other sites

Thank you for the offer, but you will not want to do any building for me. No one will, or at least they should not. :P

 

I want everything to be exactly the way I have it visioned and not almost. So you would just end up rebuilding it and spending several days on one room, as I myself do, too, when I do not find them satisfactory. Same goes with decoration and lighting. Your pain and suffering would know no limits, for my requirements do not, either. But thank you for the offer. I am also using mr_siika's Castle Seaview resources, so the whole thing needs to be built from very small pieces, and not ones like the vanilla interiors are built from, as every pillar, wall, wall decoration, ceiling and floor piece needs to be placed separately, whereas the normal game offers, for example, whole corners for a castle room ready to be placed. It offers more customisablity, but makes building more time-consuming.

 

Scripting, however, is easier, I think. At least maybe making it for others, as I still want to do it myself for all my mods, so that I know what it does and have a chance to do it exactly the way I want to do it. That way, I will know what the level of quality is, as well. And it is the best part of making a mod in my opinion.

 

Having the objects appear could be made my building the town ready and then linking, for example, all of a stable's objects to an xmarker that is initially disabled, as well as all path points that need to be disabled when the stable appears. So that when stable needs to appear, the xmarker (and every object that has it as an enable parent with it) would be enabled and the path points 'under' or 'inside' the building disabled. It could be made in a quest script, a quest stage result script, an object script, a magic effect script or a dialogue topic result script. The xmarker needs to be a persistent reference, so that it can be referenced by its Editor ID in your scripts. For example:

MyStableXMarkerRef.Enable
MyStableXMarkerRef.DisableLinkedPathPoints
The scripting in Oblivion is easy to learn. You can check the base game player home things for examples, as the same method, slightly modified and expanded, can be used for a complete town. I only know some HTML and no real scripting language. Just the scripting language of Oblivion. But I enjoy seeing text turn into something that can be seen or being able to make things automated, to save as much work as possible and make something work with an unlimited number or targets. I will begin studies at the local university this year, studying information technology, so I will one day get to learn some real scripting languages, as well.

 

Have you found the Construction Set Extender by shadeMe? It is a must have for anyone using the CS. If it did not exist, I would never have started making any mods for Oblivion. The CS is just plain awful wihout it. :)

 

My Battlehorn Castle mod will change the whole castle layout and surroundings, the initial battle, ugrade purchase sustem, guard system, castle style, add a mine, a winery and a fishery, a court wizard, a dungeon, a chapel, a kitchen, a barracks, a separate library, some small miscellaneous features, as well as add two small quests, one to do with the mine and one with the reasons behind the attack. So it is basically a complete rebuild of the castle. And it will look unlike any other Battlehorn mod, but still keep things small. It is the first mod I ever started, and I definitely want to see it finished one day. The plan is to finish it by Christmas this year.

 

It is the only mod I have that features a lot of building, and currently the only such mod I will make for Oblivion. The Skyrim mod idea is a sort of castle on a remote island (in a new worldspace to avoid conflicts), with an Imperial research centre in it for developing new creatures and gadgets to prepare for a second war against the Altmeri Dominion (yep, that is me having played Wolfenstein a bit too much that is behind the idea). Player would be assigned to oversee its operation after he/she has helped the Empire crush the Stormcloak rebellion. There would then be Thalmor spies trying to infiltrate the castle or kill the player wherever he goes. Also direct attacks by 'bandits' - Thalmor agents disguised, together with mercenaries, to avoid diplomatic problems that would arise if the Thalmor attacked it directly. They want to steal the research results, so they do not want to pressure the Empire to close the facility, like they pressured it to outlaw Talos worship (planned to weaken the Empire by causing a civil war in Skyrim, I think). So that kind of mod planned for Skyrim. Before I start making it, I need to finish my Oblivion projects so that I can better concentrate on Papyrus and how Skyrim is different to Oblivion in regards to mod making.

Edited by PhilippePetain
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...