Editor Tutorials on YouTube - part 15 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!
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: 562
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?
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Editor Tutorials on YouTube - part 12 is out

Post by Skuggasveinn »

Matlock19 wrote:
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?
Until the asset pack gets released people need to do some legwork.

The file structure of Log2 is very much the same as Log1.
In LoG1 you had gfxAtlas = "assets/textures/gui/items.tga", and items_2.tga
In LoG2 its items.tga, items_2.tga and items_3.tga (error if you try 4 so I guess it stops at 3)
index 0 for items.tga is the Schimitar, just change your gfxIndex and refresh (ctrl+r) , you will see that the next one is the Shamans Staff and gfxIndex 2 is the Elemental Shield, continue that way until you reach 168, then change to index_2 and do the same for index_3.
after you have done that and noted it all down, you will have what you need, an overview of all the gfxIndexes in the game.

regarding the models, again the file structure is the same as it was in LoG1, item are assets/models/items and environment objects are assets/models/env
The name if the asset in the editor is a good indicator of the file name, battle_axe has the model name of battle_axe.fbx, blackmoss is blackmoss.fbx, fjeld_warg_meat is (you guessed it) fjeld_warg_meat.fbx
You can also use bitcpy python script for Blender that lists out the path and filename in the dialog window before importing if you run into naming discrepancy.

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Editor Tutorials on YouTube - part 12 is out

Post by minmay »

Alternatively, now that we have the scripting reference we know that you can just do this:

Code: Select all

print(spawn("fjeld_warg_meat").model:getModel())
assets/models/items/fjeld_warg_meat.fbx
(and so on for the gfxIndex, gfxAtlas, etc...)
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Editor Tutorials on YouTube - part 12 is out

Post by Skuggasveinn »

minmay wrote:Alternatively, now that we have the scripting reference we know that you can just do this:

Code: Select all

print(spawn("fjeld_warg_meat").model:getModel())
assets/models/items/fjeld_warg_meat.fbx
(and so on for the gfxIndex, gfxAtlas, etc...)

That's excellent minmay, being more at home with Blender and Photoshop I often forget the simplicity of scripting :D
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
Post Reply