No Mutants Allowed!
No Mutants Allowed
We were here before the fall....
 
FAQ  -  NMA  -  Search -  Memberlist -  UsergroupsRegister Files - Gallery 
Profile -  Log in to check your private messages -  Log in 

Defonten posters

About ianout scripts...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    No Mutants Allowed Forum Index -> IanOut
View previous topic :: View next topic  
Author Message
aQua
Hideous Freak of Nature



Joined: 15 Jul 2004
Posts: 9
Location: Lithuania
Status: Offline

PostPosted: Sun Jan 09, 2005 15:33    Post subject: About ianout scripts... Reply with quote

What do I need to know to write my own scripts for my map? Do I need to learn some kind of programming language ?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mvBarracuda
Vault Dweller



Joined: 11 Apr 2004
Posts: 753
Location: Dresden, Germany
Status: Offline

PostPosted: Sun Jan 09, 2005 20:58    Post subject: Re: About ianout scripts... Reply with quote

aQua wrote:
What do I need to know to write my own scripts for my map? Do I need to learn some kind of programming language ?

IanOut uses Lua 5.0 for scripting. Lua is a free programming language that is often used in games as a scripting language e.g in Farcry. If you want more information about lua you can find them here: http://www.lua.org/about.html

The scripting is similar to the Fallout 2 scripting language, so there's no real programming knowledge needed, but it will be an advantage if you already wrote some own programmes and know how programming works; and it's easier if you already scripted Fallout 2 maps.

Here are some sample scripts, but I don't know how to attach the scripts to critters / objects / etc. so Sztupy hopefully can post the solution here Smile

A scripted door:
Code:
Item = Classes.GetCurrentItem()
if Item:GetState() == 1 then
 Item:ChangeState(0)
else
 Item:ChangeState(1)
end


Aradeshs script
Code:
Char = Classes.GetCurrentChar()
Ian = Classes.GetIan()

if Char.var1 == 2 then
 if Ian.inventory:CountItem(10) > 0 then
  GVar.Set("artalk",0)
 end 
end
if GVar.Get("artalk") == 0 then
 if Char.var1 == 0 then
  Text.SetFile("aradesh1.ios")
 elseif Char.var1 == 1 then
  Text.SetFile("aradesh2.ios")
 elseif Char.var1 == 2 then
  Text.SetFile("aradesh3.ios")
 elseif Char.var1 == 3 then
  Text.SetFile("aradesh4.ios")
 end
 Text.SetPosition(0)
 Mode.TalkMode()
else
 if Char.var1 == 1 then
  Char:Taunt(0,System.GetText("aradesh.sve",11,14))
 elseif Char.var1 == 2 then
  Char:Taunt(0,System.GetText("aradesh.sve",15,17)) 
 elseif Char.var1 == 3 then
  Char:Taunt(0,System.GetText("aradesh.sve",18,18)) 
 end
end


Another Aradesh script
Code:
Text.ClearTexts()
Char = Classes.GetCurrentChar()

if Text.GetPosition() == 0 then
 Text.SetMain([[Ahh, Ian. I''ve already waiting for you. I''ve got a quest for you. It''s dangerous, but you can gain reputation in the town.]])

 Text.AddLine([[Come what may come!]],3,1)
 Text.AddLine([[No, Aradesh, I''m frightened!]],2,1)


elseif Text.GetPosition() == 2 then
 Text.SetMain([[Then I will pronounce you DEATH!]])

 Text.AddLine([[(attack)]],100,1)

elseif Text.GetPosition() == 3 then
 Text.SetMain([[Wery well, I know, that you''re the bravest and most intelligent p[erson in Shady Sands. (:-)) We face the biggest problem Shady Sands ever had. We urgently need you, but with your help...]])

 Text.AddLine([[Spit it out!]],4,1)
 Text.AddLine([[(you wait)]],5,1)

elseif Text.GetPosition() == 4 then
 Text.SetMain([[Don''t be impatient! So...]])

 Text.AddLine([[(you wait)]],5,1)

elseif Text.GetPosition() == 5 then
 Text.SetMain([[So we couldn''t solve the problem. We have found a small den north-east of Shady Sands. It''s called Rat Base. It is just a small meadow, but the threat our town must face is...]])

 Text.AddLine([[Tell me the problem, I''ve already faced wolves, deathclaws, humans, bandits, dangerous creatures, UFOs, nothing is a threat to me.]],6,1)
 Text.AddLine([[Sorry I''ve already retired.]],2,1)

elseif Text.GetPosition() == 6 then
 Text.SetMain([[A MANTIS lives there!]])

 Text.AddLine([[Hű, micsoda ellenfél...]],7,1)
 Text.AddLine([[Hah, what an enemy...]],8,1)
 Text.AddLine([[Well, that''s too much for me.]],2,1)

elseif Text.GetPosition() == 7 then
 Text.SetMain([[For you it''s enough. I''l give you a PipGirl 2000, which is a great laptop.]])

 Text.AddLine([[What technology...]],9,1)
 Text.AddLine([[I give up.]],2,1)

elseif Text.GetPosition() == 8 then
 Text.SetMain([[Mantis is a small green bug. It can fly, but during combat it doesn''t use this ability.]])

 Text.AddLine([[And why is a mantis a threat to our town?]],10,1)
 Text.AddLine([[What a great enemy...]],7,1)
 Text.AddLine([[I think I''l retire!]],2,1)

elseif Text.GetPosition() == 9 then
 Text.SetMain([[Go Ian, I''ve already marked the location of Rat Base in your PipGirl, and Shady Sands is also marked, so you can come back. We now, that you''re dumb enough not to find your way back home. Now go!]])

 Text.AddLine([[Okey, okey, I''l go!]],101,1)
 Text.AddLine([[I''ll go, wish me good luck!]],11,1)
 Text.AddLine([[I won''t go!]],2,1)

 Map.WorldMapShow(22,25)
 Map.ShowCity(1)

elseif Text.GetPosition() == 10 then
 Text.SetMain([[He eats our crops. I am speaking of a WHOLE mantis!]])

 Text.AddLine([[What a great enemy...]],7,1)
 Text.AddLine([[No.]],2,1)

elseif Text.GetPosition() == 11 then
 Text.SetMain([[DIE!]])

 Text.AddLine([[It will happen...]],101,1)

elseif Text.GetPosition() == 100 then
 Mode.TurnBasedMode()
 Char.var1 = 1
 GVar.Set("artalk",1)

elseif Text.GetPosition() == 101 then
 Mode.NormalMode()
 Char.var1 = 1
 GVar.Set("artalk",1)

end


A script of Paszti
Code:
Text.ClearTexts()
Char = Classes.GetCurrentChar()

if Text.GetPosition() == 1 then
 Text.SetMain([[Hallo? ]])

 Text.AddLine([[Pászti, it''s me Ian. I''ve stolen a phone here in Shady Sands, and I''ve tought we can talk. Imagine: I''ve got an important quest. A mantis is great threat to our town, and I must stop him. Have you heard from Rat Base already? There lives the beast.]],2,1)

elseif Text.GetPosition() == 2 then
 Text.SetMain([[No. ]])

 Text.AddLine([[Don''t you want to guide me? ]],3,1)

elseif Text.GetPosition() == 3 then
 Text.SetMain([[Ahh... ]])

 Text.AddLine([[Oh well, but we will talk with each other by phone, okey? I will call you from every location, and you will aid me with your advices. Do you agree?  ]],4,1)

elseif Text.GetPosition() == 4 then
 Text.SetMain([[Yes. Bye! ]])

 Text.AddLine([[Bye! ]],101,1)

elseif Text.GetPosition() == 101 then
 Mode.NormalMode()
 GVar.Set("CanTalkToPaszti",1)
 GVar.Set("PasztiTalk",1)

end


So try to study the .ios files in the "\IanOut\IanOut.dat\scripts" and the "\IanOut\mod\IanOut\scripts" folder and you'll be gain knowledge about IanOut scripting very fast. When Beta 5 is released I'll plan to create a script reference where you can find information about every function and how they work / parameters / etc.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
aQua
Hideous Freak of Nature



Joined: 15 Jul 2004
Posts: 9
Location: Lithuania
Status: Offline

PostPosted: Wed Jan 12, 2005 16:41    Post subject: Re: About ianout scripts... Reply with quote

Thanks mvBarracuda. I've analised scripts and they're really simple. I even know now how to attach them Smile But now I stuck with mapping. After conversion of Dims mapper, I can't find any critters and some objects in my map(size of .act file is 0). I tryed to add them with IanEd, but the only thing that I know what to do is level editing Confused I hope that in beta 5 everything should be easier 8)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mvBarracuda
Vault Dweller



Joined: 11 Apr 2004
Posts: 753
Location: Dresden, Germany
Status: Offline

PostPosted: Wed Jan 12, 2005 17:22    Post subject: Re: About ianout scripts... Reply with quote

aQua wrote:
Thanks mvBarracuda. I've analised scripts and they're really simple. I even know now how to attach them Smile But now I stuck with mapping. After conversion of Dims mapper, I can't find any critters and some objects in my map(size of .act file is 0). I tryed to add them with IanEd, but the only thing that I know what to do is level editing Confused I hope that in beta 5 everything should be easier 8)

It's not your fault: the critters aren't converted by PipMapper Sad So the only way to get them in IanOut map is to use IanEd. ATM we're trying to contact the author of PipMapper to encourage him to continue develope PipMapper.

Anyway: ATM I'm working on a detailed Mapper tutorial where I'll list all mapper keys and how to script critters etc. Stay tuned Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    No Mutants Allowed Forum Index -> IanOut All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group