I am working on a MAP pack for Rth30 and EIB.. Need advice about AI setting

YES Im releasing on moddb a map pack that will gives more troops, tanks, and even 30 cal machine gun placements.

BUT I need help with one aspect, for a few levels I need to tweak the health to less than 100 for a few of the Germans… How might I do this in the editor. I look at the germans default properties, but I see no place to edit the damage specifics for an individual soldier. The reason for this is, A few of the Germans will have a scripted sequence that must require them to only take one hit to kill. SO please any advice would be GREAT! Pooky, rendroc, boatman, anyone? I hope y’all are out there! BTW this mod will be a GREAT addition to the war zone mod as well. I play them both together.

I’ll have to think about it. You’re talking about EiB and RtH30, of course :relaxed:

If you have a script that is triggering the spawn, you could add to that script a routine to find all of those infantry with that tag after they are spawned and set their health to 1. This is probably the way to go.

Otherwise I think you need a either a custom infantryspawner or a custom infantry class. Unless there is a way to set the health in the spawner and we just haven’t found it yet. I can check on that tonight.

1 Like

Thanks! This is really the last step and then I’ll be ready to release these maps. And the Germans whose health I’m trying to edit are pre-existing from the stock game. So I hoped there might be a simple way to edit their health. Or like you said, create a script that makes them at a certain health level.

P.S, another realistic thing I did with the maps was give Germans realistic weapons. We know that NO entire German platoon was outfitted with fg42 or stg44, so for some maps I painstakingly gave each German troop a k98 or mp40 or panzerfaust and made the stg and fg42 slightly more rare.

I must know - WILL THERE BE A SOUND MOD?

Cause I’m incredibly interested in hearing REAL gun sounds, Jmoney1.

1 Like

Actually the map pack will feature real recorded background ambience. The hill 30 fight sounds even better! I kid you not.

Don’t you lie to me, you filthy sombitch!

The promise you made must be paid in full or you will suffer thy wrath of @MickityMike and his squad of lost souls.

I checked it out and there is no built-in way to set the spawn health. However, it’s pretty easy to make your own custom spawner for the level.

In the Actor Class browser, find CharacterSpawnerGermany. Right click it, and select “New”.
For Package leave it as MyLevel, I think that will save it into your level. The class name you can set to CharacterSpawnerGermanyHealth or anything you want to name it.

I think it should open up a script window. You need to create a function, like this:

function ConfigurePawn( Pawn aPawn )
{
Super.ConfigurePawn( aPawn );
aPawn.Health = nSpawnHealth;
aPawn.default.Health = nSpawnHealth;
}

Then you click Tools->Compile Changed and it should say success at the bottom.

After that you should be able to add the new Spawner the same way as any other Spawner to the map. In the default properties, under the “None” tab, it should have a nSpawnHealth entry that you can set to 1 or whatever.

The new spawner is saved into the map so I don’t think you can reuse it in other maps. For that you would have to either create the class again in each map you want it in, or compile a new package (not MyLevel, you name it something else) which creates a new .u file that has to be installed with your maps for them to work.

Good luck.

Cant thank you enough for the time and effort you put into checking into this. That definitely helps. I wonder… Since I am trying to alter the health of a few germans who already have scripted arts (made by gearbox), in this script, would I be able to put that germans specific tag into it so that the health applies to Them.

And if I create a new custom spawner, do you think I could edit the properties of the existing germans to use it, and it not interfere with the script that gearbox created for them? I know this is a lot, but thanks!

Well if you are trying to change infantry spawned by scripts that are already put in the map by Gearbox, I’m not sure…

You might be able to do what you are saying by changing the Gearbox spawner to the custom spawner somehow.

But if you can’t, I think you would have to either create another script, or modify the one that spawns those Germans. In both cases you will need different code to set their health than what I posted.

That’s true, are you aware of where their scripts are located in the maps? I can probably edit one of their scripts.

never mind looks like things worked. I basically ended up creating a new infantrygermany class with less health… and in the actor properties of the germans i was trying to edit, i switched the spawn class to the new one created. Thanks, I didn’t know it was that simple to create a new class. However, I may have to tweak it a bit, seems as if creating a ‘new’ infantry class can make the spawn have glitchy movements.

Their scripts are scattered around the map, usually near where the spawn is but not always. It can be hard to find sometimes. I can’t remember if there’s a way to search the actors for something like that.

Creating a new Infantry class might not work with my mods, although I’m not certain. If you already use my packages for your maps, you should create your new class from mjcInfantryGermany instead of InfantryGermany if you want to use my mods.

Ah thanks! I’ll try that!

Almost there. The compiling Germans worked in rth30. But in earned in blood when I try to compile script changes from making a new class from mjcinfantrygermmany it says error in line 2. So idk if there is a problem with eib editor or what. Have you had these issues with eib unrealed?

I don’t know. Did you forget the semi-colon at the end of the lines? It should work with EiB the same way, so I’m surprised.

Well I’m not sure what the deal is, looks like my earned in blood sdk won’t compile anything, not even an already existing package. Well all I can say is, if you get the time, possibly could you see about creating a new class from your mjcinfantrygermany. The only thing that would be changed is the health to ‘99’ instead of 100. The package could be left as ‘my level’ and the name as ‘mymjcinfantrygermany’. And you could email me the .u file, only if you have time. Either way, I plan to have the maps uploaded on moddb by next week!! Thanks for everything. You have sort of become the new boatman around here lol.

Got it working! Look forward to releasing the maps! Stay tuned

Hey, jmoney!
Few questions:
Will those maps be historically accurate or they will be just a mere context for some pure skirmishes?
Can you post the link to the mod’s page on moddb?

Thanks and keep up the good work!