[REL] ReScalePA: Converter to create smaller units

Discussion in 'Released Mods' started by cola_colin, September 21, 2014.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I don't know exactly why those statements were made back then. One thing to consider is that papa is only some form of compiled format that is read by PA, but Uber doesn't actually use those files. So they would need to convert the source files, whatever they might be. Though writing a converter for them probably isn't harder. Overall I'd guess that writing a converter like this for a member of the dev team would be a few days of work to get it to work completely correct in every case, my version certainly is not correct for i.e. the teleporter effect. Dunno how to scale that (yet at least).

    I think the reasons why Uber was so hesitant are not all technical, but maybe also about design considerations. Dunno really. Well now they have a tool to do pretty rapid tests for design considerations :p
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    It really depends on how much of the papa format they made or whether it's just a slightly modified FBX. Although this converter may have only taken a few days, it took us a long time to reverse engineer the format in the first place.
    What Uber was talking about was that the engine isn't built with dynamic scaling in mind, so you can't just add a blueprint value "model_scale" and have it apply; it needs to be done as we are doing it by directly modifying the models.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    My assumption of a few days is based on the assumptions that they do know the file formats they use themselves or know how to run some other form of script via their modeling tools, true.
  4. Pawz

    Pawz Active Member

    Messages:
    951
    Likes Received:
    161
    @cola_colin One quick question before I try this out - how does the pathfinding perform on a smaller (eg, 1/2) scale? I know in Supcom we could only go so small before the pathfinding broke. Also wondering if the AI still knows what to do.. probably the 2 most critical components :)
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I don't know about the AI. I've not tested pathfinding, but the few commands I gave to bigger groups (50+ ants through a line of factories) were just like normal. More testing is required for sure :p
  6. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    Thanks for this cola, I'm amazed honestly, I had thought this impossible before.

    This will be great for making some miniature units for a mod. :D
  7. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    At 0.3x the AI works fine, pathfinding works fine as well.
    The only broken things I noticed during a single planet vs AI was:

    - units refuse to walk into the teleporter
    - the pgen lights look somehow wrong.

    I've added the teleporter to the list oof stuff to be not scaled in the conf file. Also updated the mod on github, so teleporters are unscaled now. Don't think that is a real issue. Stargates just have to be big :p (Though if somebody knows what they are missing please tell me :S)

    EDIT:
    Also I just realized I changed the scale of the premade mod to 0.5x
    Well, guess that's probably better anyway.
  8. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Oh you're right!!! pff! I'm such a noob!
    well thank you!!

    which commander did you make small??
  9. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    None
    You can read the readme on github, make sure too have a java jre installed, change the config file and make a mod that scales all commanders or some or whatever. Though all commanders are quite a few units actually, so that makes the wait time that confused you even longer :p
  10. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    @cola_colin
    couple small details I'd like to throw up in the air and hopefully you have the time :

    alpa pgens mods is one of my favs. Any chance you could use the alpha model to size down instead?

    how do we fix the lights on pgens? is it fixable?
    Last edited: September 24, 2014
  11. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I don't know
    You can probably replace the papa files for the pgen in your PA and then run the conversion, that will make it use the papa of the old pgen, so you get a "alpha pgens mod + rescale". In theory any server mod (RCBM, Statera) can be scaled like that as well.
    Basically I wrote a program to scale down PA's unit meshes, animations and unit definitions, what pgen file is in there doesn't matter as long as it is a papa file. You can scale down anything that is a PA /media/pa/ directory basically.

    To fix the lights of pgens I *think* there may be something in the json of the pgen I missed. Dunno. You're free to investigate: Edit the json file of the pgen in the mod and see how it looks like ingame. Or maybe those lights or some form of effect file, or like the skirt_decals defined in some other, referenced, file.
    Dunno. It's not a big issue to me, the more glaring question is: Why do teleporters at scale 0.5 not work?
  12. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    do units have to fit :p ?
  13. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I think it is about some form of "entry point" that the units fail to reach on the rescaled teleporter. Really no idea how that works.
  14. doud

    doud Well-Known Member

    Messages:
    922
    Likes Received:
    568
    as far as i'm concerned i find this scale down really better.
    Now i really wonder why Uber has never considered scaling down units.
    I may be missing something.
  15. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I am sure they considered alot and many things, but if they were to explain the reasoning behind all considerations they make, they probably would've not written a single line of code till today.
  16. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    You could just make the textures be a client side mod FYI.
    cola_colin and Raevn like this.
  17. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Also, I wonder if there's actually a parameter within the model section of the blueprint that lets you specify a path to a texture, rather than using the one based off the model name.
  18. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    That's what am I talking about in the first post. Well maybe not directly, but yeah I guess it could be packed together in a way that has the textures in a client mod and everything else in the server mod. That way the server mod won't be that super big and it won't crash without the textures client mod, the units would just all be texture less.
    I guess that way I can put it on pamm without people going wtf every time they host/join a lobby

    EDIT:
    Works pretty well, nice idea @stuart98 I'll put it onto pamm this evening.
    With this the server mod is reduced to ~12mb (still no commanders scaled though, they would push it up to 20mb again). The textures for all units are around 121mb.

    EDIT:
    Yeah people who are missing the ttexture ui mod get a playable but rather blank experience:
    [​IMG]
    Last edited: September 30, 2014
  19. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    ReScale 0.4x + a general textures client mod is now on pamm. Just download the server mod rescale 0.4x, it depends on the textures mod. You have to make sure every player in the game has the client mod, or the game will show no textures for them.

Share This Page