Skip to content

How much is really possible? (very long and rambling post, make a cup of tea first)

chilvencechilvence Member Posts: 50
edited May 2016 in UI Modding
This is a pretty vague question, I know, but I am asking it because I have no experience with lua so I can't make a snap assessment. Beyond just moving a few buttons around and peering meekly in terror at UI.menu, I haven't been doing much other than play the game.

Don't get me wrong I am stoked that such an integral part of the game has been opened up for modding - but I am really worried that the potential might be limited by what the programmers at Beamdog have planned for. I am almost fanatical about open source gaming, I hate the fact that mainstream games are designed to be sold like a sealed appliance, used once and then thrown away. My school used to teach us computer logic on Acorns using a thing called LOGO, in primary 3. Since I discovered PC gaming, I've never owned a console since the Mega Drive
(*that's what it's called, and it's still better than the SNES)
I am actually giddily excited about the prospect of playing an open source clone of Red Alert 2 in development that I found the other week.

Open source is something I really like GemRB for, because the sky is the limit. If you don't about know it, it is a very valiant attempt at a clone of the infinity engine. It's not perfect, I feel it's safer to call it an enthusiasts project because it takes some patience to set up, but you can actually play BG1/2 and IWD1 all the way through, and unlike here, Icewind Dale 2 and Planescape Torment are actually visible on the distant horizon... but I digress..

When I was last playing BG2, using GemRB before even the Enhanced Editions were out, I had all the weapon switching and spellcasting anyone could ever want on the main screen, because it was all scriptable in glorious Python. I had quick access to every potion and quick item, I could change any weapon and arrow quickslot with two clicks, I had a spellcast feature that organised by spell type and even extended to extra rows of buttons automatically. I had smart characters that were independant enough to automatically bag gems and rings, and identify items on sight if they possessed enough lore. I had a UI that scaled automatically to the resolution. Yes, I even bashed the UI over the head until it would allow shields and two handed weapon swapping (although my solution was... um... effective it was shall we say 'inelegant'). I did all of this for myself, because I wanted to figure out a bit how Python and C++ work, despite the fact that I am actually a cook, and most of my efforts were fuelled by late nights getting home and lots of alcohol.

The next thing on my list of things to hack in, was a longstanding pet peeve: stuff that you put into containers, you just end up forgetting it is even there (well, I do, but I'm 30 going on 90 in the senility department). I wanted to be able to put a scroll case in a quick slot, and as a quick item, use any of the scrolls inside it without having to faff around with the silly inventory screen. Sort of like the 'grimoire' idea on PoE. In GemRB, there is literally nothing standing in the way of you doing that, any of that and more, other than having the time to spare to write the code.

Then... Siege of Dragonspear appeared out of nowhere, and I found myself like a toddler fixated on a shiny new toy... I'm still trying to see where it fits with my other toys.

So my question is really, "Is this type of freedom available in BGEE? ", and if the answer is 'no', then my question becomes "When is this type of freedom going to be available in BGEE?", and if the answer to that is 'not likely', then my final question is "Can we ever dream of getting access to the source code to more of the game, so that the player community can fill it with glorious love and funky soul?" I don't think its an unreasonable question, I have heard rumours that a great portion of the game had to be re-written by Beamdog already so they might even be in a better position to do it, so I am just begging to know if there is hope for this. I think BG is such a such an important part of the gaming world, that has become so beloved by so many people, and played for so long, that we ought to get a chance to see how it ticks and create our own code, rather than having to pine helplessly for features on Redmine. The community has more salt than that.

I also don't think it is anything to be afraid of either. If anything, if Beamdog wants to keep making more BG material after this, it's a worthy option to consider: why wouldn't it benefit them to be able to rely on the modding community to supercharge development of the infinity engine? They can move on to whatever new and Shiny technology they want to use for their new projects, and at the same time put the dear old Infinity Engine into a cosy retirement home and let us the community care for it in its old age. I think id software really pioneered or at least championed the idea of releasing the code to the game after it has sold enough copies with Doom, and it worked out so well, that even 23 years later the game is still thriving in its own community. Id can probably still count on sales of Doom 1, purely on the basis people finding the open source updates to the game.

It would only be an act of altruism Beamdog, but you wouldn't be lonely, you'd be following in the beloved tradition that Doom 1 2 and 3, Heretic, Quake, I-IV, Duke Nukem, Unreal, Apache Havoc, Arx Fatalis, Jagged Alliance, Freespace 2, Gothic 3, Alien vs Predator, Mechcommander, Sim City and countless other games have done before: https://en.wikipedia.org/wiki/List_of_commercial_video_games_with_available_source_code . Hell, even...Lemmings has source code you can find, and it's making me want to investigate... And to be frank, alluding to a point I made earlier, people will find a way to get around it if you don't consider the idea. System Shock 2 is only playable on modern systems because someone found a copy of the long lost source code to the Dark Engine on an unmarked cd found in an auctioned development kit for a Dreamcast of all things. The rights to publish the game after the developers went bust had to be tracked down to an obscure insurance company who nobody would have heard of. All that was missing was a sign saying "Beware of the LEOPARD". Command and Conquer is such an iconic game, that after EA bought and killed the studio that invented it, some people got together, sucked up their grief, and said 'well, we'll just make our own' and presto, you get 'OpenRA'.

And for Baldur's Gate, we have 'GemRB'...still in active development by a global network secret programmer gnomes. Playtested by intrepid individuals and at least one alcoholic Chef.

I know that the BG mod community is one of the most Die Hard groups you will ever find, who managed to keep the game maintained, patched, tweaked, and alive for more than ten years all on their own. They figured out how to stitch the game together into one massive tale and are working on the equivalent project for the Enhanced Editions and Siege of Dragonspear. They very nearly ported BG2 to the Icewind Dale 3rd edition ruleset without any help or source code, only hardcoded limits and unfixable bugs in the engine cut the project short. Just imagine what this group of fans could do, with the unfettered freedom to change anything in the game?

Sorry it was a long and meandering question. I kid you not, I started out with a simple, one line "Can you make custom action buttons?", before you know it the devil possessed me to write 8 paragraphs... I tried to stop...my hands.... the burning :'(
loliennonlinearcoastRicoHeartPeccaRavenslightAbel

Comments

  • RicoHeartRicoHeart Member Posts: 1
    I approve of this message.

    The following thoughts are disorganised, sorry.

    In a world where we can collaborate without space-time constraints on a software project like GemRB... creating something that we all own... it is a matter of learning programming, learning how to make decisions together, how to do teamwork. And when I write learning, I also mean learning by doing.

    Group decision making, harmonizing different value systems, needs and wishes, building something together are really interesting to me. I like the tools and mindset of Nonviolent Communication. Debian is probably a good example for collaborative software building.

    I also believe that liberating software does not equal turning the money tap off. GOG.com is DRM-free, easy to share, yet people pay. I wonder what would happen if all games on GOG (or even Steam) would be pay-what-you-want - like with Humble Bundle - AND libre (free to run, study, share, improve). How would the money be shared if the creators of these games would slowly shift from being companies but hundreds of individuals?

    Modding kept the Infinity Engine games alive for so long, among with lots of other games.
    With mod support, a software proprietor can feel in control and safe, and still harness community.

    Because a software exists outside of the world of scarcity (which is arguably an illusion), communities can build software that has freedom.

    Can we learn how to make AND own something together? It is very complex. Leadership, decision-making, feedback loops? Responsibility? Accountability? Resource-allocation?

    Liberating software as Ultimate Mod Support? There would be forks, not mods. Some kind of government and Q&A would still be needed to maintain a vanilla version.

    Collaborating on GemRB is the way to go, if that is libre software with good leadership.
  • DeeDee Member Posts: 10,447
    So the short answer is, "Anything you can do with Lua you can do with UI.menu". Add an "action lua" field to any button and you can write your own code for what you want it to do.

    There are a few things the UI.menu file can't do:

    1. It can't alter the way opcodes and effects work.

    The UI data is all contained in UI.menu. While you can reference other files, or even execute C:Eval() scripting actions to cause specific effects to occur, you can't create in-game effects that the engine doesn't already support.

    So as an example, you could use a button to cast Magic Missile or to set a global variable, but you couldn't use a button to let your character walk through walls. (Unless that's an effect that already exists--I haven't checked to make sure.)

    2. It can't cause mechanical effects without the use of spells

    If you want a button to cause a mechanical, in-game effect, you need to use existing resources. This means that if the effect you want isn't currently caused by any existing spell or item, you'll need to first create a spell or item that does it. The UI is an interface, not an engine; the engine's code is separate (and proprietary; it belongs to BioWare, even if we've made significant changes to it), and the engine is where all the mechanics are defined.

    In other words, you can make a button that automatically causes Player1 to force-cast the existing "Magic Missile" spell on every creature in the area--but you can't make a button that just gives Player1 a +5 bonus to Strength.

    3. It can't do anything unless you make it do it.

    In essence--if there's something you want it to do and you're not sure if it will work... try it! Any time you see "action lua" in UI.menu is an opportunity to write real Lua code. If it doesn't work, the worst that can happen is the game crashes until you fix the problem.

    So if there's something in GemRB that you were able to do, and you want to know if it'll work here, give it a shot.
    RicoHeartmf2112Abel
  • AbelAbel Member Posts: 785
    I never understood GemRB but if it's a rework of the engine, then it should allow for even more modding of things that could be hardcoded in the original games.
Sign In or Register to comment.