LUA Request: Expanded Buildpic Menu System

LUA Request: Expanded Buildpic Menu System

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

LUA Request: Expanded Buildpic Menu System

Post by Argh »

Basically, I'd like a new, contextual pop-up menu for units, where users can CTRL-click (or SHIFT, or whatever they configure) on the Buildmenu that brings up a big unit description with lots more detail than the current ones. A great way to get players more immersed in the game.

This system should be easily configured, so that modders can just add the names of the image files that they're using.

Here are some screen concepts. Yeah, yeah, crude and all that... I just whipped this out to show what I'd like to be able to bring up:

This shows the basic template- multiple images used to make the final composite (for easy re-use by artists and programmers, and smaller overall file size):
Image

And here's a concept, showing what the final would look like, after alphas were applied to the images, etc. Yes, it's crappy art, but meh, this is just a concept.
Image
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

OTA had a system like this (without built in text, thoguh you could hack that in) where if you pressed f1 i think, over a unit, it woudl give detaield stats as well as a different build picture

useful for newbise, and immersive as argh said. Good idea, +1

itd be easy to code, hard to implement fully. another content layer to deal with in terms of the expanded textual desription for modders though :P
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You can already do this in lua so nor equests needed but I think replacing the main command panel with soemthign that used a tile system for build orders rather than a buildpic, similair to the way XP tile view works in windows explorer but rehashed.

You'd have a list of buildpics and next to each buildpic would be their name cost and description.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I'm not saying, "can this be done with LUA", AF, I'm asking somebody to find the time to write it :roll:
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

a smaller version could popup when you hover the mouse over buildpics if there is a gap in the GUI it could fit into
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

I'm actually planning to build this into my IceUI as one of the next features.. Right now I was thinking about pre-defined fields so it would look similar for different mods.

I thought about a long description and unitIDs for "good against" and "bad against" so that it would display the buildpics of those units (similar to SW: Empire at War, if anyone knows that).

For Nanoblobs this wouldn't be much work but we would need some skilled players to write stuff for AA/BA/CA/XTA and all the other mods. And since I'm planning to make the GUI for different languages, we would need that stuff for each language and the mod devs would need to include it in their mods..

If you really think we need something more flexible (like free positioned images and stuff), we can talk about it but it "implementable" and easy enough so that most of the mod devs will include it..
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I'd prefer using a series of images, myself. The "good against, bad against" could just as easily be maintained by a mod developer as a Photoshop / GIMP layer in a composite as anything else, and allowing for it to be image-based means that making it look radically different is as simple as working up the artwork. That, and it means that building the LUA code for it (on the modders' end) would be as simple as:

1. Insert line referencing Unitname into the UI script that does this
2. Insert new bitmap paths

Instead of:

1. Learn how LUA does everything with text, including special characters, fonts, etc.
2. Write up the unit's documentation in the LUA code
3. Test, and retest, to make sure that the text isn't too big for the background image, etc., etc.

In short, doing it with images would a lot lower on the maintenance end for modders- they can build a static template image, stick their screenshot / render / whatever of the unit into the appropriate spot, then make their text in whatever image editor they're using, change a two-line section of LUA, and voila, they're done. I'm working on fairly large mod at the moment, with over 150 units in it, so ease of maintenance is a big deal.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

The thing is, since I would want to include it in my IceUI, I would like a consistent look with the rest of the GUI.. So personally I wouldn't like background pictures and stuff..

The argument that I don't have to learn about Luas font rendering (with special characters) doesn't really count since I will have to learn that anyway for the rest of the GUI..

I can't imagine that having the decription in images rather then plain test would be lower on the maintenance end for modders but maybe that's just me (haven't done any modding).. An example of how this would look like for the modder could be something like this:

Code: Select all

return {
  corcom = {
    description = "This is the Core commander.. He rocks!",
    goodAgainst = { 43, 76 }, -- or unitnames (representing classes or whatever)
    ...
  },
  cormex = {
    description = "Extracts metal, bla..",
    goodAgainst = {},
    ...
  },
  ...
}
(This would be the english file but there should be different languages.)
This could also be added as userdefined fields in the COB/FBI (or whatever that unit-format is ;) ) afaik..

I understand that you would like the highest possible amount of flexiblility but I'd rather have it look like the rest of my GUI.

The problem is that we have to look into the future and find a metadata-format that suits most of future needs so that modders don't have to provide the same information as images AND text.. I think text is more flexible and can better be transformed into something else (ie images) than images..
User avatar
Belmakor
Posts: 212
Joined: 16 Nov 2005, 00:01

Post by Belmakor »

Isn't there also the fact with images it is harder to:
  • Have the UI for the unit descriptions scale appropriately to different screen res
    Have a localisable GUI
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

The scaling shouldn't be a problem.. I have to include that anyway for buildpics/minimap/all other stuff..

The localization stuff would need a new image for every language.. I think this is a very good point since translators are probably easier to find if they just have to change text..
Post Reply

Return to “Lua Scripts”