Jump to content

R&D XCOM Map Alterations


Amineri

Recommended Posts

a random civ swapped to my team :smile: edit: ingame bug: his action points don't get restored in new turns

edit2: my aliens get new action points each turn

http://i57.tinypic.com/xm8oes.jpg

http://i62.tinypic.com/2q30uok.jpg

Edited by LiQuiD911
Link to comment
Share on other sites

  • Replies 473
  • Created
  • Last Reply

Top Posters In This Topic

Here are the sources:

just cook and stream the map :smile: check out the object properties in content browser->scene and in kismet. at the moment i can spawn enemies,change their teams. spawn civvies in my team,change their names. The way to go is to observe (with ueexplorer AND deserializeAll in upk utils) how the streams/special missions use kismet objects and import them cutting all unnecessary references and functions. I'm calling it a day with this update :smile: ps:yes, that's the uber ethereal xD and there is a VERY interesting command called SeqAct_GiveItems

https://www.dropbox.com/s/5k6w75883xvmfzj/xcom%20map%20classes%2013.01.15.rar?dl=0

https://github.com/iiiLiQuiDiii/XComGame-Map-Stubs

 

http://i61.tinypic.com/dmz3ud.jpg

Edited by LiQuiD911
Link to comment
Share on other sites

Swapping the cyberdisc to Neutral team made it run around but the aliens were more interested in killing my troops.

 

I've managed to import an existing mesh in my stream through stubs :smile:

 

http://i61.tinypic.com/2w3s2rq.jpg

It works but I suspect it will be necessary to manualy create the archetypes from the various particle components,sounds, events etc

Also, we'd need a better way to import the assets as the current method requires a full copy of a map for a single archetype

 

Here's what I did:

Create a simple mesh from a brush in udk and place it in Package "VEH_PickupTruckB", grouping "Meshes" and name "PickUpB".This will be our stub to place in the streaming map.

 

in defaultengine add VEH_PickupTruckB as a native package

[Engine.ScriptPackages]
+NonNativePackages=UTGame
+NonNativePackages=UTGameContent
+NativePackages=XComGame
+NativePackages=VEH_PickupTruckB

 

make a copy of the map CB2_MP_Blank and name it VEH_PickupTruckB

My idea to make a new map is to move all the actors an volumes of CB2_MP_Blank in an unreachable corner and stream in the terrain prefabs and everything else. Another mistery to solve is how to make visibility blocking to work.

 

edit: the pickup actor places cover (I choose half or full) so the problem was in my cube mesh

zhang civvie appearance can be forced by setting the civilian "template name" to Zhang

Edited by LiQuiD911
Link to comment
Share on other sites

Say Hello to Anna Song :smile: it's been a while. (civ action points bug is still persisting and I can't make them uncontrollable/add ring)

Here's a short list of templates:

EscapedAbductee

Zhang

GenericSoldier1

General

 

http://i62.tinypic.com/2emgdc4.jpg

Edited by LiQuiD911
Link to comment
Share on other sites

Well, all the assets are cooked into map files and we have to either prevent cooking our stubs into new maps and try to load actual assets from inside some existing package (same way as you do now) or try to extract those assets from maps and recreate them with all the textures and meshes.

 

If you use camera zoom mod to set insane zoom values, you'll be able to see how XCOM maps are made:

http://steamcommunity.com/sharedfiles/filedetails/?id=347976244

 

Basically, each map is a small area inside a 'ghost' city. I don't know if this is a good idea, but if we can clear that area, we can stream in our own map instead, which will have access to embedded assets.

 

Edit: just tried 'stub asset' thing with menu sound cue, cooked into XComGame: SoundCue'SoundUI.MenuSelectCue'. This one is cooked directly into XComGame.upk, but originally it was a separate package. So, to obtain a correct in-game reference I used UDK to create a stub SoundUI package with one empty SoundCue object named MenuSelectCue and saved it to UDKGame\Content folder.

Edited by wghost81
Link to comment
Share on other sites

update on civilians: if we set the team to "eTeam_All" we obtain the standard VIP behavior: an uncontrollable unit which is is ignored by aliens, also the unit cannot be selected by leftclicking (as the vanilla maps). Setting it's team to neutral just hides the pawn.

I didn't manage to make any use of "give items", any value I tested just hides the pawn :\ Spawn Unit has only few working options.

For now the spawn civ options "bDrawProximityRing" and "bUnitFlag"(the hp bar) have no effect, however the hp variable works.

That's probably because I've cut some variables, I'll try adding stubs for those but it requires a lot of imports. I really wish there was a declare but not define type instruction :\ The spawned civvies in my team can't be selected by the NextSoldier command, only by manualy clicking them.

 

I'm not sure if I got something wrong with the team enum which is placed in Core.Object

The original one is

 

  Reveal hidden contents

 

 

what I did is inline the definition in Swapteams.Also, naming more than one elements "eTeam_DONT_USE" doesn't compile.

 

  Reveal hidden contents

 

could this cause any problems? Compiling the xcom Core.Object crashes the compiler

 

@wghost But how can we make the stub reference the intended asset without the copy/rename trick I did?

Also, I'm not sure we can extract cooked meshes/skelmeshes etc and rebuild them.. what I intened is to rebuild the connections between them like explosion events, emitter locations , rigid body setup etc

 

 

edit: the objective list commands seem to work fine

Edited by LiQuiD911
Link to comment
Share on other sites

You can't re-define an object in different class, as it will result in a different object. I have enum ETeam defined inside Object.uc class and it compiles and works perfectly.

 

Furthermore, Actor.Spawn functions is different in XCOM:

native final function Actor Spawn(class<Actor> SpawnClass, optional Actor SpawnOwner, optional name SpawnTag, optional Vector SpawnLocation, optional Rotator SpawnRotation, optional Actor ActorTemplate, optional bool bNoCollisionFail, optional Core.Object.ETeam SpawnTeam);
UDK:

native noexport final function coerce actor Spawn
(
	class<actor>      SpawnClass,
	optional actor	  SpawnOwner,
	optional name     SpawnTag,
	optional vector   SpawnLocation,
	optional rotator  SpawnRotation,
	optional Actor    ActorTemplate,
	optional bool	  bNoCollisionFail
);
I.e. UDK version doesn't have SpawnTeam. I haven't modified it for mutators and, surprisingly, it worked perfectly. But I have no idea what effect it might have on kismet spawns.

 

Umodel can extract everything, including meshes, afaik.

 

If you look inside the map package, you will see TheWorld object and tons of other objects. TheWorld is what contains actual map actors. Everything else are assets, cooked directly into the map: textures, meshes, anims, FX, prefabs, etc. If we somehow clear TheWorld and make it into an empty map, it will still contain all the assets we could use. In theory. :smile: Question is, how to clear it. TheWorld.PersistentLevel object contains some binary data which looks like a list of object references. I suspect, those are actors of this level. We could try to set all those to null for a start and see what breaks. :smile:

Edited by wghost81
Link to comment
Share on other sites

I'm an idiot, you're right, I thought that a stub could force load another file. The copying and renaming a map does nothing, a stub can replace an already loaded object.So we can spawn copies of objects present on a map.

Instead of spawn actor I use the kismet SeqAct_SpawnCivilian which creates the unit by calling

SpawnedUnit = XGAIPlayer_Animal(XGBattle_SP(XComTacticalGRI(GetWorldInfo().GRI).m_kBattle).GetAnimalPlayer()).SpawnCivilian(SpawnPt, bFemale, bUnitFlag);

But I've commented out the variable var XGUnit SpawnedUnit to save me the importing of XGUnit stubs. oddly it works .. partialy. As if the Civvies in my control are not part of the my squad. TATC command doesn't move them.

By simply copy-paste-ing ETeam in the default Object.uc I get the following error

D:\UDK\UDK-2011-09\Development\Src\Core\Classes\Object.uc(20) : Error, Duplicate enumeration tag eTeam_DONT_USE

 

Another not-quite-useful-yet update: We can make meshes project half-decent shadows.Also custom flat floor actor works.

 

http://i61.tinypic.com/2n16irm.jpg

Edited by LiQuiD911
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...