Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: mrtwosheds on July 30, 2009, 03:26:31 PM

Title: Placing 3rd race units on mpi maps.
Post by: mrtwosheds on July 30, 2009, 03:26:31 PM
Those of you who make mpi maps will be familiar with the mpic1_ivturr_fvturr path points on maps.
This of course no longer works if you are using a 3rd race.
mpic1_ivturr_fvturr_dvturr, causes an error.
Presumably because the mpi.dll only deals with the 2 races I and F, and cannot figure out D.
Does anyone have any clever solutions? or do I need a custom mpi.dll?
If I do need a custom dll, do I have any volunteers to write one?  :-D Because I have no idea how to do it.

Preferably In a way that enables it to still use existing mpi maps. Like it read's mpic1_ivturr_fvturr path points and figures out that the races are in fact I and D and substitutes D units for F units.
In fact an Mpi dll that does not racially discriminate at all and could work for any races, (get rid of the bit where it hands out weapon upgrades, aip's can do that)

Title: Re: Placing 3rd race units on mpi maps.
Post by: Nielk1 on July 30, 2009, 04:17:38 PM
Just a thought: Perhaps it can only hold 2 names max?
Title: Re: Placing 3rd race units on mpi maps.
Post by: mrtwosheds on July 30, 2009, 04:21:25 PM
Yes that's right. It just means I can't pre-place buildings and Units of all 3 races on any one map using path points.
Title: Re: Placing 3rd race units on mpi maps.
Post by: Nielk1 on July 30, 2009, 04:24:28 PM
Can't two pathpoints be in the same place?
Title: Re: Placing 3rd race units on mpi maps.
Post by: mrtwosheds on July 30, 2009, 04:43:06 PM
Yes?
I may be being dim here, Do you think if I just add another one...? ill try it!

edit:
It works, why didn't I think of that! Thanks Nielk1
Title: Re: Placing 3rd race units on mpi maps.
Post by: Nielk1 on July 30, 2009, 04:54:42 PM
I really just pulled that out of my rear. I had no idea if it was true or not.
Title: Re: Placing 3rd race units on mpi maps.
Post by: mrtwosheds on July 30, 2009, 05:05:09 PM
 :-D
And I tried to read the MPinstant.cpp to see if I could figure out how it worked!  :-D
Title: Re: Placing 3rd race units on mpi maps.
Post by: Red Spot on July 30, 2009, 08:42:45 PM
Doesnt it work just as easy if you use the "mpiC1_xvturr" method of using pathpoints?
Or do you want 2 (or more) units to be placed on the same spot, like the GH maps with their turrets on the Atowers?
Title: Re: Placing 3rd race units on mpi maps.
Post by: TheJamsh on July 30, 2009, 09:39:03 PM
Dont think you can use x. because it still counts as a racename still.
Title: Re: Placing 3rd race units on mpi maps.
Post by: mrtwosheds on July 30, 2009, 10:08:44 PM
QuoteDoesnt it work just as easy if you use the "mpiC1_xvturr" method of using pathpoints?
The mpic path only does 2 races, so you need another pathpoint for the 3rd- 4th etc.
Don't know if a sort of wildcard will work, I read code about as well as I read Martian. 
Title: Re: Placing 3rd race units on mpi maps.
Post by: Red Spot on July 31, 2009, 05:03:23 AM
From Nettips.rtf (in your root BZ2 folder):

QuoteMPI mapmakers have some new things they can use to tweak things. Beyond the normal pathpoints used by an IA map, by using a naming convention, you can place down race-specific items based on the CPU or human race. These pathpoints are of the form 'mpic_fvscav_ivscav' (spawns a Scavenger on the CPU team, appropriate to the CPU race) and 'mpih_fvtank_ivtank' (spawns a tank on the human team, appropriate to human race). The 'mpic' and 'mpih' parts are case sensitive, and you can place a number after those to make them unique, such as 'mpic1_fvscav_ivscav' and 'mpic2_fvscav_ivscav'. 1.3 adds in some new syntax to the mpic/mpih commands. With mpic/mpih, it can take just one odf listed if desired. For the ODF(s) listed on that line, the first character is checked against the first character of the CPU/human's recycler odf, and builds it only if they agree. For example:
mpic1_fvscav_ivscav   - builds a scav if the CPU is ISDF or human
mpic2_ivscav_fvscav   - builds a scav if the CPU is ISDF or human (order doesn't matter!)
mpic3_ivscav          - builds an ISDF scav only if the CPU team is ISDF
In the above items, the number means nothing; it was created to make the pathpoints unique (as they must be). 1.3 also adds in two new forms, 'mpiC' and 'mpiH' which allows a the built vehicle to be built in whatever race the CPU or human is. For example:
mpiC1_Xvscav          - builds a '_vscav' in the CPU's race
mpiH2_Xvturr          - builds a '_vturr' in the human's race
In the above items, the 'X' is used as a filler character; it could be any alphabetical character. It'll be read in, then replaced by the true race of the CPU/human team
Title: Re: Placing 3rd race units on mpi maps.
Post by: Nielk1 on July 31, 2009, 05:07:43 AM
that should work if your races follow identical naming rules. Good find. Not sure if it matters so note the capitalization, it looks quite important.
Title: Re: Placing 3rd race units on mpi maps.
Post by: TheJamsh on July 31, 2009, 06:27:17 AM
mmm interesting...
Title: Re: Placing 3rd race units on mpi maps.
Post by: mrtwosheds on July 31, 2009, 11:24:18 AM
That's just what I was hoping for, Ill try it out.
Title: Re: Placing 3rd race units on mpi maps.
Post by: Red Spot on July 31, 2009, 03:17:23 PM
http://www.bzuniverse.com/forum/index.php/topic,6703.0.html