Jump to content

Creating new weapons, items, aliens, pawns by cloning them?


Kargan3033

Recommended Posts

Is it possable to clone an item, weapon, ailen, pawn NPC/Civy and edit the clone into a new weapon, alien, NPC/Civy or item and intsert it into the game?

 

Also how would I edit the visual aspect of the new weapon, alien, NPC/Civy, item?

 

Yes I'm a newbie when it comes to editing LOL

Link to comment
Share on other sites

Yes, it is, but it's a difficult task to start on, and it's a thing that's being researched currently, and as such, not very well documented. I recommend you start on an easier task, because that is a task requiring fairly advanced stuff.

Ok then, it seems to me that it is possable to clone an item, weapon, alien, pawn and rename it to something else and edit it to spec to create a new weapon or what not, I mean look at the new weapons in Long War such as the gauss long rifle and what not.

Link to comment
Share on other sites

@kargan: Oh, yes, it would be easier to clone a weapon exactly with the same appearance but different stats than it is to make one with new appearances.

 

@xextremex: If you make a new one from scratch, yes. But now he's talking about cloning one with different stats, which is a much easier task than the original one.

Link to comment
Share on other sites

What we did in Long War to create new gameplay weapons that re-used existing models (e.g. the Strike Rifle, which shares a model with the Sniper Rifle, but has different stats), is the following :

 

1) Create a new gameplay item via hex editing

2) Map the new item to the existing model via DefaultContent.ini line :

WeaponPackageInfo=(ItemType=eItem_MecArmor1_Kinetic,ArchetypeName="Weapon_ExaltSniperRifle.GD_ExaltSniperRifle")

In this case this is the ballistic-level strike rifle, which shares a model with the vanilla EXALT ballistic sniper rifle.

 

3) I added some non-proportional scaling for weapon models by modding the XComUnitPawn.AttachItem function :

                        m_vTurnInitialLocation.X = float(I[0] / 1000000) / 100.0;
                        m_vTurnInitialLocation.Y = float((I[0] % 1000000) / 1000) / 100.0;
                        m_vTurnInitialLocation.Z = float(I[0] % 1000) / 100.0;
                        MeshComp.SetScale3D(m_vTurnInitialLocation);
                        m_vTurnInitialLocation = vect(0.0, 0.0, 0.0);

the m_vTurnInitiaLocation is the place where I store information pulled from the config file which allows configuring how to non-proportionally scale each weapon.

 

The I[0] value is retrieved from the DefaultGameCore.ini line

BalanceMods_Classic=(eType=226,	iDamage=0,iCritHit=85100100,iAim=0,iDefense=0,	iHP=0,	iMobility=0,	iWill=0);

The ballistic Strike Rifle is item 226, and the iCritHit=85100100 line is what provides the non-proportional scaling, in this case 85% in the x direction and 100% in the y and z direction.

 

------------------------

 

Note that this allows us to duplicate new game weapons without altering the original model, at least not by altering the weapon model package files (e.g. Weapon_ExaltSniperRifle_SF.upk).

 

The next step, which Drakous has made some progress is but is still pretty messy, is creating a duplicate of that model file and hex altering the package itself to change the model itself. Note that distributing such changes can potentially be a sticky issue, particular with DLC models which a mod-user might not have.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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