Editor Tutorials on YouTube - part 14 is out

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
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: Editor Tutorials on YouTube - part 12 is out

Post by cromcrom »

Thankyou so much for the tuts. May I suggest some GraphicsContext tutorial ? That could be tremendously helpfull.
A trip of a thousand leagues starts with a step.
User avatar
Skuggasveinn
Posts: 561
Joined: Wed Sep 26, 2012 5:28 pm

Re: Editor Tutorials on YouTube - part 12 is out

Post by Skuggasveinn »

GoldenShadowGS wrote:

Code: Select all

for v,i in alcove:contents() do
What is the purpose of the "v" ?
in my head it just means for variable(v) counter(i) in alcove.
A more correct syntax would have been for _,i in alcove,
Taken from the Lua scripting guide
LUA scripting guide wrote: The variable consisting of only an underscore "_" is commonly used as a placeholder when you want to ignore the variable
By all standards I'm still a complete freshman in Lua, never used it before modding LoG1, so I'm still learning myself, and do mistakes often ;)

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
GoldenShadowGS
Posts: 168
Joined: Thu Oct 30, 2014 1:56 am

Re: Editor Tutorials on YouTube - part 12 is out

Post by GoldenShadowGS »

I am learning as well. I think I figured out how to do a for loop

Code: Select all

for i = 1,4,1 do
print(i)
end
i is the variable
first 1 is the starting value of i
4 is the max value of i
the second 1 is the increment value.

so this for loop, it will print

1
2
3
4

If I change the increment value to 2. then my print will only show

1
3

I completely understand this so far.

So then I am looking at some Grimrock scripts examples and a lot of time, the increment value is left off. I assume the increment value defaults to 1 when it is missing.

Then I see your for loop with v,i and I am completely lost. it has no numbers or anything.
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Editor Tutorials on YouTube - part 12 is out

Post by NutJob »

GoldenShadowGS wrote:I am learning as well. I think I figured out how to do a for loop

Code: Select all

for i = 1,4,1 do
print(i)
end
i is the variable
first 1 is the starting value of i
4 is the max value of i
the second 1 is the increment value.

so this for loop, it will print

1
2
3
4

If I change the increment value to 2. then my print will only show

1
3

I completely understand this so far.

So then I am looking at some Grimrock scripts examples and a lot of time, the increment value is left off. I assume the increment value defaults to 1 when it is missing.

Then I see your for loop with v,i and I am completely lost. it has no numbers or anything.
You're well on your way to understanding programming IMO. As for the v,i it just represents the key,value in the table (array).
User avatar
Mysterious
Posts: 226
Joined: Wed Nov 06, 2013 8:31 am

Re: Editor Tutorials on YouTube - part 12 is out

Post by Mysterious »

Hi Skuggs I was doing the stuff you did in blender and I cant figure out how you just selected the single brick and how you deleted the background. I got the scale right but as for the rest, I am just clueless thxs.
User avatar
Skuggasveinn
Posts: 561
Joined: Wed Sep 26, 2012 5:28 pm

Re: Editor Tutorials on YouTube - part 12 is out

Post by Skuggasveinn »

Mysterious wrote:Hi Skuggs I was doing the stuff you did in blender and I cant figure out how you just selected the single brick and how you deleted the background. I got the scale right but as for the rest, I am just clueless thxs.
import object
scale it down by 0.01
go to edit mode
press a (selects all the faces)
in to tools section click on remove doubles (removes any double faces that come with the import)
select a single face from the brick that you want do edit/move
press ctrl+l (selects all the linked faces)
move the brick around
do the same for the background, just select one face of it and hit ctrl+l and then delete

I wasn't sure how deep to go into blender editing in that tutorial, there are a lot of good tutorials about the basics of mesh editing in Blender floating around the internet, so I left it vague.
If people want to get serious about 3d modeling then there is nothing stopping them to learn the basics all the way up to the advanced stuff.
Personally I like video tutorials more then a wall of text, and that's one of the reasons I started this.
If you are interested in learning Blender I recommend http://www.blender.org/support/tutorials/ also Blender Guru is doing fun stuff at http://www.blenderguru.com/

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Mysterious
Posts: 226
Joined: Wed Nov 06, 2013 8:31 am

Re: Editor Tutorials on YouTube - part 12 is out

Post by Mysterious »

Hi Skuggs thxs for that information I will give it try asap. I was thinking of editing models from LOG 1, what the community has already made that is. I tried reall hard to get pandafox Skeleton Ghost to work but keep getting errors, plus there is a particle effect that comes with his Skeleton and I don't know how to do particles in LOG 2.

Ok then I'm of to try your method and check out those tut's thxs for the help mate :)

EDIT: I hope all the assets you made for LOG 1 you will port over to LOG 2. Also I have noticed that Germmany is back I hope he does the same. :)
EDIT: 2 I did it wow got the brick out and removed the background, this is so exiting I need to learn more now. I guess ill start from the beginning and work my way up, like you and Leki. Awesome stuff ok to the tuts now thxs againg Skuggs, I will concentrate on model stuff now instead of making a Mod. I hope you and Leki don't mind but I'm sure ill need some help along the way :)
User avatar
The cube
Posts: 94
Joined: Tue Apr 23, 2013 6:09 pm
Location: Barren Desert

Re: Editor Tutorials on YouTube - part 12 is out

Post by The cube »

Skuggasveinn wrote:you can do this

Code: Select all

defineObject{
   name = "longersword",
   baseObject = "long_sword",
   components = {
      {
         class ="Item",
         uiName = "Longersword",
         description = "exactly like a longsword but just a tiny bit longer."
      },  
}
}
That will use the long_sword as a base, but when you define a class (in this case class="Item") you overwrite the whole class, so in the code above the item class is missing the weight, they gfxAtlas index and everything else in the Item Class, but it has the other classes intact.
So the guessing part is limited to the class your are overwriting.

Skuggasveinn.
Image


How am i supposed to know the position of the item in the graphic atlas for example? How do i know all the things i need to put in there to make it work?

Sorry for being angry. I have had too little sleep. Your videos are awesome, but you just have missed some things.
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Editor Tutorials on YouTube - part 12 is out

Post by Batty »

How do we find the material names in the models like you did with the dungeon brick material?

I opened the .obj & .mtl files in Notepad++ and can only find "newmtl None" & "usemtl None"
User avatar
Matlock19
Posts: 23
Joined: Sun Nov 02, 2014 2:11 am

Re: Editor Tutorials on YouTube - part 12 is out

Post by Matlock19 »

The cube wrote: How am i supposed to know the position of the item in the graphic atlas for example? How do i know all the things i need to put in there to make it work?
I'm interested in this, too. I don't want to import new models or 2D sprites, I just want to know how to reference the ones that already exist when defining new weapons/armor/etc. I need like a big sheet that shows examples of new objects that have been created, especially how to reference the graphics files when defining an object. How can I tell what sprite and model the items use?
Post Reply