The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

[Modding Question] How do change the size of demigods & other .bp questions

By on November 29, 2009 4:36:12 AM from Demigod Forums Demigod Forums

I've been playing around with skinning different demigods, and I realized that my life would be a lot easier if I could increase the size of the demigods that I was skinning. Being able to see the effects of a skin without getting a magnifying glass out would be very useful. I've looked into various things, but I haven't found out how to do it. Anyone know?

Also, do you have to do anything special with altering the bp's of units? I keep getting failures to load when I've attempted to make *.bp modifications to change things.

Lastly, is there a way to effectively change *.bp on the fly? I've attempted to use .lua within the .bp to change things, however it crashes. I'm not even certain that lua will work when it is in a .bp. Part of the reason I am trying to do this is so that I can have a large variety of possible skins and the game with randomly select a new one every game.

Anyhelp will be appreciated, thanks.

+89 Karma | 10 Replies
November 29, 2009 5:49:27 AM from Demigod Forums Demigod Forums

What files are you changing, and in what way?


I was able to make a mod of DroppedItem_unit.bp fine. It has a nice line under Display:

        UniformScale = 0.10,

That I was able to change to:

        UniformScale = 0.50,

and sure enough, the chest of a dropped item was 5 times larger.

I tried adding this under the display for HQueen_unit.bp , but this just crashed the game.

As for the lua stuff...uhm. Mumble mumble, sleep, mumble, tommorrow...

November 29, 2009 2:11:07 PM from Demigod Forums Demigod Forums

That was one of the things I tried, which resulted in a endless loop cycle when I tried to run a game. I remember seeing an image with a huge rook in it, but they didn't provide any details. It also could of been photoshopped.

November 29, 2009 6:36:06 PM from Demigod Forums Demigod Forums

I can't pull the UV but this may help a little

http://67.55.41.251/Demigod/Queen.3DS

 

November 29, 2009 6:53:58 PM from Demigod Forums Demigod Forums

I think it could be an issue with just adding .bp files to mods. I just was to want to change the speed of a demigod in the <demigod>_unit .bp files and i get into a loop durring the loading of a skirmish.

[quote who="\lua\mods.lua"]

   There are two ways to make large-scale balance changes.

   First, you can define one or more .bp files with "Merge=true", that override
   particular fields for many units. This is how the campaign balance mod works.

   Second, you can define a function <TODO>, which is called on each blueprint
   as it is loaded. This function can then manipulate the blueprint in arbitrary
   ways.

   First, a mod can simply add a new blueprint file that defines a new blueprint.

   Second, a mod can contain a blueprint with the same ID as an existing blueprint.
   In this case it will completely override the original blueprint. Note that in
   order to replace an original non-unit blueprint, the mod must set the "BlueprintId"
   field to name the blueprint to be replaced. Otherwise the BlueprintId is defaulted
   off the source file name. (Units don't have this problem because the BlueprintId is
   shortened and doesn't include the original path).

   Finally, a mod can define a ModBlueprints() function which manipulates the
   original_blueprints table in arbitrary ways. [How/when exactly is this done?]

 [/quote]

If you know where input the funtions and the correct syntax this could help.

Does <TODO> mean that is is not implimented yet? if so does anyone know where you put "Merge=true" in the files.

November 29, 2009 7:13:14 PM from Demigod Forums Demigod Forums

Check out my Fire TB AA fix mod for an example of how to create a mod that changes the bp values for a demigod.

 

http://forums.stardock.com/369610

November 29, 2009 8:52:17 PM from Demigod Forums Demigod Forums

Thank you everyone for your comments and thoughts so far. So, following the suggestions given here and some bits from the GPG forums, I came up with the following, which I think should have worked.

Code: c++
  1. UnitBlueprint {
  2.     Merge = true,
  3.     BlueprintId="HQueen",
  4.     Display = {
  5.        UniformScale = .75,
  6.     },
  7. }

 

However, it did not. Demigods did run and it did not crash out this time, however it did not seem to change anything. I tried various values of UniformScale from .1 to 5, none of which had an effect. I reloaded between these changes to see if that was required, no effect.

Looking at the object's data (Shift-F9, Shift-F6) I can see that the property is updated, however there isn't any change in the size of the queen. Is UniformScale not the right variable? It seems like it is, but I have no idea.

November 29, 2009 10:02:30 PM from Demigod Forums Demigod Forums

Check out the character file. I thought there was a mesh size there. Something like characters/Queen/Queen_Character.lua and look for the value of DrawScales.

November 30, 2009 12:39:50 AM from Demigod Forums Demigod Forums

i think your problem may be solved Ptarth, thanks too for everyones help too,

if anyone else looks at this thread you can write the functions or unitblueprint modifications above mutiple times in that file to get changes in speed eg some of my changes are:

#to increase regs base damage

UnitBlueprint {
    Merge = true,
    BlueprintId="hgsa01",
    Stats = {

        DamageRating    = 150,
    },
}

#will decease erebus speed to 6
UnitBlueprint {
    Merge = true,
    BlueprintId="hepa01",
    Physics = {

        MaxSpeed = 6.0,

    },
}

December 1, 2009 12:59:40 AM from Demigod Forums Demigod Forums

--Update--

I did manage to get it to work, see the ending. I leave the remainder here in case someone may find it helpful later.

---------

Actually, I tried a couple of different things, but the DrawScales tag didn't seem to do anything when I changed it. I might doing it wrong, but I don't think so

I tried:

/mods/Queen/units.bp

Code: c++
  1. UnitBlueprint {
  2.     Merge = true,
  3.     BlueprintId="hqueen",
  4.   DrawScales = .7,
  5. }

as well as:

/mods/Queen/hook/characters/queen/queen_character.lua

[code="c++"]

CharacterBlueprint {

    Merge = true,

    BlueprintId="hqueen",

  DrawScales = .7,
}

[/quote]

My last idea is that the blueprint isn't hqueen but something that includes open or closed. I'm looking into that now, but if anyone has a better idea I'd love to hear it.

--Result--

The mod_units.bp form that Sorian used didn't work, regardless of the different BlueprintID's I tried.

The method that did end up working was placing /mods/Queen/hook/characters/queen/queen_character.lua and /mods/Queen/hook/characters/queen/queen_open_character.lua. I took the entire file and made the DrawScales adjustment, everything worked after that. Curiously if queen_open_character is not modified and queen_character is modified, the Drawscales adjustment, somewhat works. The mesh is larger, but the mesh is very distorted, joints are not where they are supposed to be.

December 1, 2009 2:16:28 AM from Demigod Forums Demigod Forums

Some further updates.

Placing only:

 

Code: c++
  1. CharacterBlueprint {
  2.     Merge = true,
  3.     BlueprintId="hqueen",
  4.   DrawScales = .7,
  5. }

in queen_open_character.lua fails to do anything. However, doing:

Code: c++
  1. CharacterBlueprint {
  2.     Merge = true,
  3.     Name = 'Queen_Unpacked',
  4.   DrawScales = .7,
  5. }

causes the unpacked form to have the size change. It also strips off all of the other animations. However, this is rather useful for looking at the skin changes. The Merge statement has no effect, which I guess is not surprising since it only affecs blueprints. What does surprise me is how the file knows where it is supposed to go. Apparently,the Name field is sufficient to identify the data construct and for it to be referenced from other files. Given this, then some of the table manipulations from the SupCom modding documents may be used, but I'm uncertain. I had I different idea of how the tables worked, I may be wrong. Sorian is probably the best one to address this (or anyone else that worked with SupCom).

So, it works (I don't get it, but it does). Thanks guys.

Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000141   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.