You must be logged in to post messages.
Please login or register

Grey Havens (World Builder & Game Mods)
Moderated by Sir Hugh, Blatant

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Want to Learn INI?
« Previous Page  1 2 3 4 ··· 7  Next Page »
posted 01-29-07 08:07 PM EDT (US)   
Ask your questions here: I'll be happy to answer them. This is like the question thread, except that it's solely for INI, and the answers will be in tutorials, which are longer. Ask me an INI question. I may start by giving a mini-tutorial.

Also, please specify in your questions if this is for a mod or a mod map.

Thanks to Kester for the sticky!

Q&A




Wait, so what is this topic about?
This is about modifying BFME2, or at least some aspects.

What do you mean?
Well, basically, this topic is about coding for the game: anything related to that.

Sounds hard...
Well, it is, but once you know what to look for, and how everything's related, it gets easier.

What is ini?
The game keeps its data in files called BIG files. Basically, they compress the data within it. We're looking at the INI.big file, which contains hundreds of files. Every file in that big file ends in INI, which is the format the game uses. There are some files that end in INC, but we won't have to worry about that.
What can ini do?
Well, it can do a lot. It can add new powers to units, cause buildings to spawn specific units, and most of the things used in the game. However, ini is by no means a magical language in which everything is possible.
What's an ini file?
It's an initialization file, to be exact. It tells the game all of the information about a specific object, its modules, etc.


What's an object? And how do I get started?
I'm making tutorials right now. If you ever have a specific question, ask it on this topic. I'll be happy to help.


About Coding




In the next few weeks or so, I'll be putting up tutorials as people need them, but I'll start with object-oriented programming as it relates to BFME2.

The game's code is basically a collection of objects. Some objects do some things, and some do others. Some are buildings, and some are units. Let's start with Boromir.Object GondorBoromirBasically, all this does is tell the game that there is an object named GondorBoromir. There is nothing special about this object, except that we can call it GondorBoromir.

The following code in the game code tells the game the parameters, or the characteristics of the object. The game's code starts out with putting down the art parameters. The art parameters tell the game how Boromir is supposed to look. This is hard to code for a newbie, so let's skip it for now.

Next, you'll see all sorts of random attributes; here are some important ones:BuildCost
BuildTime
WeaponSet
ArmorSet
VisionRange = VISION_HERO_STANDARD
ShroudClearingRange = SHROUD_CLEAR_HERO
BountyValue = GONDOR_BOROMIR_BOUNTY_VALUE
DisplayName = OBJECT:GondorBoromir
RecruitText = CONTROLBAR:GondorBoromirRecruit
ReviveText= CONTROLBAR:GondorBoromirRevive
Hotkey= CONTROLBAR:GondorBoromirHotkey
CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles

CommandSet = BoromirCommandSet
CommandPoints = 50
These are very important.
The BuildCost is how much the unit costs.
The BuildTime is how much time (in seconds) that it takes to build him.
WeaponSet is the type of weapon that Boromir uses, and under what conditions.
The armorset is the same, except for armor.
The VisionRange is how far Boromir can "see" units. If it's under attack stance and it has a large vision, it will attack units very far away.

Alex_3737's Tutorials

[This message has been edited by Ancalagon_4554 (edited 06-05-2007 @ 02:08 PM).]

Replies:
posted 02-13-07 08:26 PM EDT (US)     26 / 171  
Yes, it would. All that DWARVEN_EREBORTOWEREXPANSION_BUILDCOST stuff is to tell the computer to look there in the gamedata files.
posted 02-13-07 08:46 PM EDT (US)     27 / 171  
Thanks a lot Ancalagon sorry for taking so much of your time
posted 02-13-07 08:50 PM EDT (US)     28 / 171  
Nah, no problem. I enjoy solving problems.
posted 02-13-07 10:12 PM EDT (US)     29 / 171  
Well I looked in Player Template, put "IsengardSaruman" along with those heroes, still nothing, by the way, my INI is all one file, not a folder

So Mr. Iron-Jawed Swan, any solutions?

[This message has been edited by Ethycs (edited 02-13-2007 @ 10:15 PM).]

posted 02-14-07 05:20 PM EDT (US)     30 / 171  

Quote:

my INI is all one file, not a folder


Is this for a mod map or a mod?
posted 02-14-07 05:45 PM EDT (US)     31 / 171  
It's a mod for my own personal use
posted 02-14-07 06:18 PM EDT (US)     32 / 171  
What faction do you want to put him in?
posted 02-14-07 06:24 PM EDT (US)     33 / 171  
MOTW, and also a tutorial so I can switch any hero to any faction I wish
posted 02-16-07 12:11 PM EDT (US)     34 / 171  
What have you tried so far?
posted 02-16-07 03:01 PM EDT (US)     35 / 171  
Nevermind, I figured it out on my own, and to the people that is reading

Mr. Iron-Jawed Swan isn't kidding, it is easier said than done.

(BTW Ancalagon, do I get a reward for guessing your name? :P)

posted 02-16-07 03:23 PM EDT (US)     36 / 171  

Quote:

(BTW Ancalagon, do I get a reward for guessing your name? :P)

Nah.

posted 02-17-07 09:12 AM EDT (US)     37 / 171  
lol iron-jawed swan?

P.S sry bout being off topic but i just gotta ask lol

posted 02-17-07 10:24 AM EDT (US)     38 / 171  
Ancalagon means Iron-Jawed Swan in Elvish or something. I think it's Elvish.
posted 02-18-07 05:39 AM EDT (US)     39 / 171  
Okay I havve one, me and my friend are making....a....certain map(shifty eyes) and we need a ring power, but I have two questions:

1. How would we change the name of an object?(my friend probably knows this actually...)

2. Okay, now the ring power, how would we go upon it making him stealthed, and can attack and move, and has a two minute timer that you CANNOT SEE, BUT when someone walked within a certain distance of him while power was on, it would be deactivated?

posted 02-18-07 10:30 AM EDT (US)     40 / 171  
What's a ring power?
posted 02-18-07 10:45 AM EDT (US)     41 / 171  
Sorry, by the ring power I mean, that's what I want to call it. The ring, you know ,that's what gives him the stealth for two minutes unless someone walks near, and I don't want to show the timer because the ring has to be unreliable.
posted 02-18-07 01:11 PM EDT (US)     42 / 171  
I still don't know what you're talking about...


Who is this him? What's two minutes?

posted 02-18-07 02:29 PM EDT (US)     43 / 171  
Okay, say boromir has this power we want to give him.
We want to give him a power called 'The one ring.' Where he puts on the ring. We want this ability to have no recharge time.
When you click on it we want boromir to go invisible, but can still move, so it's elven cloak only you cna move during it. We want the invisibility to last two minutes, but we do not want a timer to be shown. We also want it so that if something walks too close to boromir, then the invisibility is disabled.

By 'the one ring' we mean as in an ability like his 'horn of gondor' and such.


If anyone wishes to ask me to play in the tournament with my friend Eliec, just come up and ask, and yes, I am only playing with my friend Eliec.
posted 02-18-07 02:32 PM EDT (US)     44 / 171  
Do you know basic INI?
posted 02-18-07 02:40 PM EDT (US)     45 / 171  
Not especially, but my friend eliec's pretty good at ini, he's going to do the ini for the map, so I'm posting this for him basically. In fact he's looking at these posts right now....*waves*

Eliec says that he only ROUGHLY knows how to add an ability, but he's not quite sure, so he asks if you could say exactly how to add this power to boromir, the ini code for it I mean.

WE know that we have to add elven cloak to boromir, and make it so it works while mving. That he THINKS that he can do, but asks if you can still post how.

The thing we have no idea about is how to make the timer that isn't shown, and how to make it so that if someone walks near enough, then the power is deactivated.


If anyone wishes to ask me to play in the tournament with my friend Eliec, just come up and ask, and yes, I am only playing with my friend Eliec.

[This message has been edited by Briggsby (edited 02-18-2007 @ 02:47 PM).]

posted 02-18-07 03:27 PM EDT (US)     46 / 171  
I'd first like to say that INI isn't some magical language in which everything is possible. Hmmm... I don't know. I'll have to look into it. For timer help, look to the special power recharge time.

[This message has been edited by Ancalagon_4554 (edited 02-18-2007 @ 03:27 PM).]

posted 02-19-07 01:55 PM EDT (US)     47 / 171  
Ok I do know some stuff about ini as well and I have SOME anwsers for you people.

@ Mastersword67

Your changes are not taking effect because when you use the edit command in final big progran, the INI.big doesnt automatically save itself on exit. What you have to do is after you have finished editing the file and it goes back into the INI.big go to save as and re-save the whole INI.big, Then it will remember the changes your making.

@ Ethycs

Saruman isnt showing up beacuse each fortress has a maximum of 7 "revive" slots & MoTW uses all of them, so I'm guessing you put him at the back of the list which is why he is not showing up. There are two ways to fix this,

1. is to simply remove one of the other hero's

2. Is to go into the commandset.ini and hit CTRL+F for find and search out the commandset for the MoTW fortress, There you will see 7 "revive" slots. Simply add another revive slot making sure that it says # 8 or whatever the next number is.

That should make Isengard Saruman show up for you.

@ Briggsby

Thats a very complicated request and I'm not sure that I know how to even begin to approach that. But I to will look into it.

However Ancalagon_4554 is right, you cant just simply think up new powers and make them work in the ini's.
They are very distinct limitations to what you can do.

I hope this helps guys! :P


"Losto Caradhras, Sedho, Hodo, Nuitho i'Ruith!" Sleep Caradhras, be still, lie still, hold your wrath!- Gandalf The Grey
posted 02-19-07 01:58 PM EDT (US)     48 / 171  
Hey, thanks.
posted 02-19-07 03:29 PM EDT (US)     49 / 171  
Sure, just hope it works... lol

:P


"Losto Caradhras, Sedho, Hodo, Nuitho i'Ruith!" Sleep Caradhras, be still, lie still, hold your wrath!- Gandalf The Grey
posted 02-20-07 12:35 PM EDT (US)     50 / 171  
I was aware of that, though I do know that most of it is possible, the only thing I am not sure about is the part where the area space to deactivate the power.
That bit I am not sure about, and that was the real reason I wanted to ask, whether that part is possible, but I decided to ask how to do it becuase that way it would answer both of my questions.
I do know basic ini, and my friend knows much more, but I have many maps so usually I try and find how to do it from other maps.
But I could not see how to make the timer not appear, and how to do the area part, so this is the main reason I asked.
If you can just tell me how and if those two bits are possible, I'm sure me and my friend can work out the rest, as it is simply editing the picture and text of elven cloak, while making it work while moving, which I believe we MAY be able to work out.
But mind you, you don't have to answer remember if you don't want to take up your time to work it out,

P.S: Glad you added some more basic controls at the top, that should help people....and me, lol, by basic ini I mean VERY basic.


If anyone wishes to ask me to play in the tournament with my friend Eliec, just come up and ask, and yes, I am only playing with my friend Eliec.

[This message has been edited by Briggsby (edited 02-20-2007 @ 12:38 PM).]

« Previous Page  1 2 3 4 ··· 7  Next Page »
Battle for Middle Earth II Heaven » Forums » Grey Havens (World Builder & Game Mods) » Want to Learn INI?
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Battle for Middle Earth II Heaven | HeavenGames