another question about syntax

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
FeMaiden
Posts: 290
Joined: Wed Jan 16, 2013 8:16 am

Re: another question about syntax

Post by FeMaiden »

minmay wrote:For searching the forum you should probably use Google. phpBB's search is really bad.
FeMaiden wrote:the lua manual confused me because many of the commands and syntax rules seemed to be different from what I see in the editor.
The lua manual seems to be more instructions on the basic generalized lua programming language, while lua that is in the editor is slighty more specific to this game.
This is not true. It's the exact same language. Grimrock neither adds nor removes any language features that I know of. Just don't confuse language features with, say, global functions (e.g. the coroutine library is not available in Grimrock).
However, the Lua reference manual is a reference, not a tutorial; it's not great as your sole resource for learning the language, and certainly not if you don't already know imperative and structured programming concepts.
There are some pretty good programming tutorials on the Web, and probably decent Lua ones too. I don't think Grimrock needs its own Lua tutorial, because, well, like I said, it doesn't make any changes to the language. The scripting reference and most of my posts are written under the assumption that the reader is already capable of programming in Lua, because that skill isn't specific to Grimrock modding, and can be learned elsewhere much more easily from much more qualified people.

yeah, thinking back I remember you told me I was skipping around too much to the wrong parts of the lua manual. So the reason it seemed different is because the part i was reading did not apply to grimrock.
I do have a tendency to only skip to the part that seems to be relevant, and then i get confused when i unknowingly skip to the wrong part.

Maybe I should start form the beginning lol. perhaps there are lua tutorials on youtube or something.

I still think a lot of people get turned off by the grimrock editor because of its learning curve. The community would probably be a lot bigger if it was easier to learn.

I think back to old school nes days with games like excitebike and lode runner that had level editors and it was pretty much just painting objects onto a map.
there's a new game on Wii called super mario maker that's pretty much a custom level editor for mario games.
I guess you could do that in grimrock as well. you could just use buttons and connectors and still make a few clever puzzles, but i didn't want to do that.

the grimrock editor is not "foreign" to me, I did try to make a mod years ago when I played grimrock 1 but I got frustrated by the lua scripting and gave up.
I've played around with RPG maker, and they have similar thingsin that, wih the objects and the scripting. (I played one of the older version I don't know what scripting language it used and it was very limited)
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: another question about syntax

Post by Azel »

I found the exact opposite to be true: the Grimrock 2 Editor is remarkably simple to learn and understand. I purposely chose Grimrock 2 for my very first Mod because of how quick and easy it is to create a complete game. In contrast to, say, Mod Kits for the Elder Scrolls.

I'd be interested in hearing an example of a popular game who deploys a Mod Kit that is easier to use than Grimrock 2. RPG Maker is a stand-alone utility.
User avatar
FeMaiden
Posts: 290
Joined: Wed Jan 16, 2013 8:16 am

Re: another question about syntax

Post by FeMaiden »

well, I guess compared to modding elder scrolls, this IS easy.
maybe I just haven't tried to mod enough games.

maybe this is easier than I think it is...I mean, i am almost done with my mod and i did it in less time than howard scott warshaw was given to make E.T. for Atari
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: another question about syntax

Post by cromcrom »

You should have given a try to NWN2 toolset...
A trip of a thousand leagues starts with a step.
User avatar
gambit37
Posts: 218
Joined: Fri Mar 02, 2012 3:40 pm

Re: another question about syntax

Post by gambit37 »

minmay wrote:The scripting reference and most of my posts are written under the assumption that the reader is already capable of programming in Lua
This is a reasonable assumption to make, unfortunately it's also completely unrealistic.

I suspect many (most?) modders don't have a programming background and simply want to build something "cool".

Helping people to understand modding requires making NO assumptions, and a lot of patience by those who already know what they're doing. It's not always fun or easy to guide newbies, but it can be much more rewarding to do so than simply point them to resources and hope that they will understand on their own.

The Scripting Reference provided by Almost Human is great, but it has almost no value to a non programmer. It's therefore left to those in the community to parse all that into something usable that non-programmers can understand. To some degree, that's what this forum is for and has been reasonably successful at doing, but I suspect there are much better ways of helping people than trying to answer the same questions over again in the forum. Having a code wiki that contains solid, robust examples of how to do things would be much better than losing that stuff in countless forum threads. Perhaps this is something that can be unified, if there are enough interested people to do it?
FeMaiden wrote:I think back to old school nes days with games like excitebike and lode runner that had level editors and it was pretty much just painting objects onto a map.
FeMaiden wrote:I guess you could do that in grimrock as well. you could just use buttons and connectors and still make a few clever puzzles, but i didn't want to do that.
This kinda sums up the issue ;-) Grimrock Editor is indeed easy to use, and powerful enough to build cool maps, without needing to learn much coding. It has instant visual feedback, and the modder can see exactly what they are building as they build it. Everything snaps together and just works... It's like lego in that regard. The problem is that everyone wants to go straight to the technical lego with mindstorms robotics programming, before they've learned how to snap those basic bricks together.

Azel had great advice, which applies to learning anything really: Start small, understand the basics, build something basic that works... then move on to more complex steps.

Modding is supposed to be a fun hobby. Slow down and enjoy it.
User avatar
FeMaiden
Posts: 290
Joined: Wed Jan 16, 2013 8:16 am

Re: another question about syntax

Post by FeMaiden »

cromcrom wrote:You should have given a try to NWN2 toolset...
I actually did try to make a mod in NWN1...and gave up lol


and yeah, maybe I did make a mistake when I said "the level editor is hard to use"

although I suspect comparing this to modding elder scrolls or fallout 4.

tht's like saying ."you think heating up a can of beans is hard, it's easy compared to cooking Duck L'Orange"...but there are still people in this world who have trouble heating up a can of beans...
Last edited by FeMaiden on Thu Nov 12, 2015 1:37 am, edited 1 time in total.
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: another question about syntax

Post by Azel »

gambit37 wrote:The Scripting Reference provided by Almost Human is great, but it has almost no value to a non programmer.
indeed, although as a programmer/developer myself, I must say that the scripting reference had very little value for me. Especially compared to other scripting references that I'm used to. I've posted this example before, but here is a reference for Twitter:
https://dev.twitter.com/overview/api/tweets

The syntax for those JSON responses is very similar to LUA component/object scripts. In order to get that level of guidance for Grimrock, a user has to document the mappings between a statement on the Scripting Reference with a block of code inside the Asset Pack.

It's like having to use two different dictionaries to find out how to use a word in a sentence.

I agree with you that it is unrealistic to assume that a Grimrock Modder will be capable of programming in LUA; I base that primarily on the fact that Grimrock itself is not a mass appeal game, thus the target audience for both gamer and Modder is small. Dont get me wrong, I love Grimrock which is why I dedicated the better part of the past year to making an LoG Mod. However, Grimrock specifically targets dungeon-crawler fans who dont mind grid-based RPG gaming; and within that niche group is an even smaller number of folks who are willing to try community Mods (eg, less than half of the total Grimrock player base will ever play a Mod). And within that... and even smaller number that have experience writing software.

So unless the Scripting Reference hand-holds newbie Modders when it comes to implementing LUA syntax and Asset Pack concepts, then the motivation to dedicate enough personal time to become a skilled LUA programmer and Grimrock Asset Pack guru is primarily "from within." Meaning, you have to want to engage in this hobby as a personal goal, where the outcome is you being happy with yourself lol

The numbers kinda speak for themselves (via NexusMods) :

1) LoG 2 Mods (total)
48 Files; 11,149 DL's

2) A single Skyrim Mod: http://www.nexusmods.com/skyrim/mods/32597
388,243 Unique Downloads

3) Pillars of Eternity
75 Files; 182,983 DL's

Interesting point about the PoE downloads: the game was barely released March of THIS Year, and it doesn't even have a Mod Kit :shock:

Personally, I feel that the Grimrock Editor has a huge advantage over other Mod Kits due to its ease of use. But due to the lack of easy integration with Objects/Components/Properties/Methods... most would-be Modders may find it logical to devote their time to something with a larger community base.

If a future version of Grimrock (LoG 3??) ever manages to remove the need to type a single line of LUA when creating even the most complex of Mods, then I believe that LoG will easily dominate the custom Mods community :mrgreen:
User avatar
FeMaiden
Posts: 290
Joined: Wed Jan 16, 2013 8:16 am

Re: another question about syntax

Post by FeMaiden »

I think there should also be a distinction made between a "custom dungeon" and a "mod"

for example. modding the elder scrolls (I assume) would require you to hack into the source code.which requires a computer programming background, seeing as Bethesda, again I'm assuming, never intended for their gaming community to make "custom dungeons" with their assets.

LoG was bundles with the editor so I think many people go into it expecting to see a Super Mario Maker type level editor.

and lol at the number of downloads for skyrim mods. That's probably due in part to the popularity of skyrim. way more people play skyrim than LoG.
I remember when i started downloading mods, it took me a week to figure out how to install them all and keep them from conflicting with each other, I did not even attemptto make one of my own, i was just using the ones that other people made.
also, it should be noted that almost all the armor mods are skimpy female armor mods...
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: another question about syntax

Post by Isaac »

FeMaiden wrote:I think there should also be a distinction made between a "custom dungeon" and a "mod"

for example. modding the elder scrolls (I assume) would require you to hack into the source code.which requires a computer programming background, seeing as Bethesda, again I'm assuming, never intended for their gaming community to make "custom dungeons" with their assets.
Elder scrolls modding can get very complex; but basic mods are not that difficult ~after some familiarity with the [respective] Construction Kits; (like the Grimrock editor and a script editor combined and many times less stable, and prone to crash).

Modding [mapping] with the default assets is made fairly straightforward, it is scripting and the creation of custom assets that it becomes voodoo. I've done custom vaults and armor for FO3, and (while briefly interested) made a custom sword for Skyrim ~that I wound up using in the ORRR2.

*But the source code isn't public.
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: another question about syntax

Post by cromcrom »

[quote:Azel]Grimrock specifically targets dungeon-crawler fans who dont mind grid-based RPG gaming;[/quote]
dungeon crawler puzzle solvers. Talk about a niche here.

[quote:Azel]Meaning, you have to want to engage in this hobby as a personal goal, where the outcome is you being happy with yourself lol[/quote]
Does it mean, like for Gambit37, that once the mod is done, you won't release it to the public ? Lol. I don't believe it.
As a modder, after the hard work of working on a mod (countless head banging looking for bugs, mostly, because I am more of a "RPG systems" modder than a "fancy sword" modder), my greatest pleasure is to receive positive feedback from the community (some crazy people even thank you for your hard work !), exchange about the mod, and so on.
I do have pleasure when a system "works", and trying to devise systems that do what I want, and trying to take into consideration what limitations, exploits, and so on, could appear, however, I don't really take any pleasure in playing my own mods, because I know all the inner workings of them...

I am personally longing for a 2015 level NWN3 like toolset.
A trip of a thousand leagues starts with a step.
Post Reply