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:    
Welcome! You are not logged in. Please Login or Register.171 replies, Sticky
Battle for Middle Earth II Heaven » Forums » Grey Havens (World Builder & Game Mods) » Want to Learn INI?
Bottom
Topic Subject:Want to Learn INI?
« Previous Page  1 2 3 4 5 ··· 7  Next Page »
MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
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).]

AuthorReplies:
MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 02-20-07 01:22 PM EDT (US)     51 / 171       
Yeah, I'm trying to add a bit more every so often.
Beserkidiot
Dúnadan
posted 02-21-07 01:47 PM EDT (US)     52 / 171       
umm olorin....there are not that many limits to the stuff u can do especially if ur makin a mod but if its a map.ini it is only slightly restriced

umm the bit about makin it visible, look at the stealth module in thranduil that should work the same as the ability u sound like u want to make

NoldorWarrior73
Dúnadan
posted 02-22-07 10:33 AM EDT (US)     53 / 171       
I got a problem with somthing. I am editing the BIG files in Rotwk, i can get a commandset to work so the ElvenBarracks will spawn the BFME1 Elven warriors. It appears in the game but it won't let me sellect it, how can i fix this problem? RohanElvenWarriors.

[c=FFD700-C0C0C0]I CAME. I[c=C0C0C0-FFD700] SAW. I CONQURED. - CAESAR
If practice makes perfect and nobodys perfect, why practice?
BladeMaster300
Dúnadan
posted 02-22-07 03:11 PM EDT (US)     54 / 171       
I'm having a bit of trouble with the toggle weapon for rangers,

beserkidiot said I should...

"replace the animations with the whole faramir animation then reskinn faramir and then add the toggle weapon from faramir(note u might want to delete all the mounted animations from teh animation list)"

I think this is a good idea, but I need a little help doing it

I have one more question...

How do I go about adding another building to a faction



[This message has been edited by BladeMaster300 (edited 02-22-2007 @ 08:59 PM).]

Stokeworth
Dúnadan
posted 03-04-07 02:36 AM EDT (US)     55 / 171       
i've edited ini.big and saved both the .ini file and ini.big with finalbig. but when i run the game, nothing is changed. (i edited one of the hero's costs to 1 to see if it worked)

help?

MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 03-04-07 12:50 PM EDT (US)     56 / 171       
What did you change?
Stokeworth
Dúnadan
posted 03-08-07 07:46 PM EDT (US)     57 / 171       
i changed the BUILD_TIME variable (or something like that... i'm not on that comp right now...)

and i changed the BUILD_COST variable. (again, don't remember the var's name exactly)

i did cntr+s and then when i quit finalbig chose to save ini.big

when i loaded the hero, nothing was changed.

[This message has been edited by Stokeworth (edited 03-08-2007 @ 07:47 PM).]

MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 03-08-07 09:39 PM EDT (US)     58 / 171       
How did you change the files? Replacing the original? Creating a new shortcut with the -mod command?

Did you edit Gamedata.ini? Or the object file?

NoldorWarrior73
Dúnadan
posted 03-11-07 06:52 AM EDT (US)     59 / 171       
This isnt really about ini but im not sure if you need ini to do it. How do make the objective menu appear (It list's all the objectives like in campaign mode) in a map? If you know can you tell me plz?

[c=FFD700-C0C0C0]I CAME. I[c=C0C0C0-FFD700] SAW. I CONQURED. - CAESAR
If practice makes perfect and nobodys perfect, why practice?
MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 03-11-07 11:21 AM EDT (US)     60 / 171       
I've never tried that. I'm not sure how it could be done... it wouldn't be playable as multiplayer... but I'd extract one of the maps to see.
Stokeworth
Dúnadan
posted 03-11-07 07:20 PM EDT (US)     61 / 171       
ok, i've given up on that mod, since i was just messing around anyway...

but i have another question, where are custom heroes stored in ini.big/how do i create new heroes with modding?


sorry for all the questions, i'm sorta new to this.

MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 03-11-07 07:28 PM EDT (US)     62 / 171       

Quote:

where are custom heroes stored in ini.big/how do i create new heroes with modding?



1) Any file beginning with createahero


2) Well, I hope you're talking about new HEROES and not new CUSTOM HEROES.

TheNotorius
Dúnadan
posted 03-11-07 08:24 PM EDT (US)     63 / 171       
I just wanted to ask: Is it only me, or main Ini file is moddable only with FinalBig? Because if I change something with notebad, then it crashes. I don't like at all the version of Finalbig too much difficult to reach what u want...it is divided in sections but I preferred digiting with search in main Ini it was a lot faster for me...

[This message has been edited by TheNotorius (edited 03-11-2007 @ 08:24 PM).]

Stokeworth
Dúnadan
posted 03-11-07 11:33 PM EDT (US)     64 / 171       
so, in order to mod any hero i create i must open several different files and edit them? i looked in the createahero files and i don't think they changed when i created a new hero...
(also, all the createahero files are .inc, which cannot be edited with finalbig.)


and yes, i was talking about creating compleatly new heroes for the factions, not custom heroes


.:EDIT:.
ok, i figured out how to extract everything and open the .inc files in notepad, but i still don't understand how custom heroes are saved if it just uses variables...

[This message has been edited by Stokeworth (edited 03-11-2007 @ 11:54 PM).]

NoldorWarrior73
Dúnadan
posted 03-13-07 04:06 AM EDT (US)     65 / 171       
Hi. Im starting a simple mod. I don't add any other 3d moddels, i just use to ones alredy in the game. Anyway, i adding the bfmei elven warriors to the elf faction, but i make the commandset for the bfme1 elves witch is

CommmandSet.ini

CommandSet RohanElvenWarriorHordeCommandSet
1 = Command_ToggleStance
2= Command_ToggleElvenWarriorWeapon
3 = Command_PurchaseUpgradeElvenForgedBlades
4 = Command_PurchaseUpgradeElvenHeavyArmor
5 = Command_PurchaseUpgradeElvenBasicTraining
6 = Command_PurchaseUpgradeElvenSilverthornArrows
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
End

The game dosen't crash it fine with what i put in, but when i bought all the upgrades from the fordge it won't let me purchase the upgrades. is there somthing i missed out in the ini for the rohanelvenwarriors.
Just so you know wat is in my REWH.ini i'll wright it down.

Object RohanElvenWarriorHorde

CommandSet = RohanElvenWarriorHordeCommandSet
End

.Any help would be brilliant.

Also,

Quote:

ok, i've given up on that mod


Don't ever give up just because you fail on your first try!

Quote:

I change something with notebad, then it crashes.

No, it also happens to me. I'm not shure why it does it though.


[c=FFD700-C0C0C0]I CAME. I[c=C0C0C0-FFD700] SAW. I CONQURED. - CAESAR
If practice makes perfect and nobodys perfect, why practice?

[This message has been edited by NoldorWarrior73 (edited 03-13-2007 @ 12:01 PM).]

Just Bob
Dúnadan
posted 03-17-07 06:22 PM EDT (US)     66 / 171       
Hi,

I've almost finished my first map on WB having learnt .str and scripting in the past week. I don't really know how to work .INI though.

Could you give me a quick step by step guide on how to increase a units hitpoints so that it spawns with them.

TY.

[This message has been edited by Just Bob (edited 03-18-2007 @ 11:42 AM).]

Rikolous
Dúnadan
posted 03-18-07 07:51 AM EDT (US)     67 / 171       
Go onto the bfme1 elves notepad file and press ctrl+f then type in rohanheavyarmor and u wil find what ur looking for

Rikolous, [insert clever/funny phrase in the space provided]
Haldir_FTW
Dúnadan
posted 04-17-07 07:40 PM EDT (US)     68 / 171       
So, its feasible for me to make the build cost of a elven barracks 1 resource using ini? And NoldorWarrior said something about makeing your own heros? That'd be awsome, but i dont know ini.


Grrr still can't find that folder. And how do I get my mods to work? Sorry im asking so many questions, theres so much I dont know that I'd love to learn.

[This message has been edited by Haldir_FTW (edited 04-17-2007 @ 07:44 PM).]

MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 04-17-07 09:09 PM EDT (US)     69 / 171       
Found files ending in .big?
Haldir_FTW
Dúnadan
posted 04-18-07 04:56 PM EDT (US)     70 / 171       
Nope, theres nothing of the sort. Neither are there any files that even look like they have html.
MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 04-18-07 05:10 PM EDT (US)     71 / 171       
Where are you looking? This is in Program Files. And HTML?
Alex_7373
Dúnadan
posted 04-21-07 05:08 AM EDT (US)     72 / 171       
hi Ancalagon, do you mind if a post some guides on this topic?

|73/-\73| Sign up toAlex_7373BfmeForums ClickHere |73/-\73|
Want to learn ini? Page1 Page2 Page3

[This message has been edited by Alex_7373 (edited 04-21-2007 @ 01:16 PM).]

MR ANCALAGON
Dúnadan
(id: Ancalagon_4554)
posted 04-21-07 12:57 PM EDT (US)     73 / 171       
I could probably do that. I haven't forgotten any, even though I haven't played BFME2 in ages.
Alex_7373
Dúnadan
posted 04-21-07 01:15 PM EDT (US)     74 / 171       
I used to play around with bfme1 ini when i first got it so im going to learn again.

.:EDIT:.

Do you think i still know enough ini to mod?

I know:

  • PlayerTemplate.ini
  • CommandButton.ini
  • CommandSet.ini
  • Spellbook & Science.ini
  • Object Codeing (Stuff like whats in GondorAragorn.ini)
  • Credits.ini
  • vedio.ini

    And i will learn more, dispite some are not that usefull.


    |73/-\73| Sign up toAlex_7373BfmeForums ClickHere |73/-\73|
    Want to learn ini? Page1 Page2 Page3

    [This message has been edited by Alex_7373 (edited 04-22-2007 @ 01:15 PM).]

  • Alex_7373
    Dúnadan
    posted 04-26-07 03:08 PM EDT (US)     75 / 171       
    INI GUIDES

    I have olny written a guide for beginners because i wouldn't like to take Ancalagons place in this topic.


    Table of contents

    CommandSets and CommandButtons

  • Introduction
  • CommandButtons
  • CommandSets
    SpellBookEditing


    CommandButtons & Commandsets



    Introduction

    CommandSets & CommandButtons are very important in the game. They are what gives a hero there powers. CommandSets lets an Elven Barracks spawn Elves, CommandButtons create the button to click on to spawn it. So what this tutorial will teach you how to create your CommandSets and command buttons.

    What we will need for this tutorial
    CommandButton.ini
    CommandSet.ini

    So letís get started.



    CommandButtons

    Now to start I will show you some examples of CommandButtons:

    Command Button Command_ConstructElvenLorienWarriorHorde
    Command= UNIT_BUILD
    Object= ElvenLorienWarriorHorde
    Options= CANCELABLE
    TextLabel= CONTROLBAR:ConstructElvenLorienWarriorHorde
    ButtonImage= BEElvenBarracks_LorienWarrior
    ButtonBorderType= BUILD
    DescriptLabel= CONTROLBAR:ToolTipBuildElvenLorienWarriorHordeWithNoPrerequi sites
    Radial= Yes
    InPalantir = Yes
    ShowProductionCount= Yes
    ; UnitSpecificSound = GondorArcherVoiceBuy
    ;Options= NEED_UPGRADE
    ;Upgrade= Upgrade_StructureLevel2
    End

    That is the code that will allow the command set to enable the code: Command_ConstructElvenLorienWarriorHorde. CommandButtons don't just allow a barracks spawn units, they can for example enable the code: Command_SpecialAbilityBladeMaster
    Just by adding this code to CommandButton.ini:

    Command Button Command_SpecialAbilityBladeMaster
    Command = SPECIAL_POWER
    SpecialPower = SpecialAbilityAragornBladeMaster
    TextLabel = CONTROLBAR:BladeMaster
    ButtonImage = HSAragornBladeMaster
    ButtonBorderType = ACTION
    DescriptLabel = CONTROLBAR:ToolTipBladeMaster
    InPalantir= Yes
    AutoAbility= Yes
    AutoDelay= 30.0 ; this should sync with the Aragorn's hero mode effect time
    PresetRange= 50.0
    UnitSpecificSound = AragornVoiceBladeMaster
    End


    CommandSets

    Now CommandStes. I will use the two previous examples that used in the Command Button Chapter.
    Commandsets are the second setp in ini to make an Elven Barracks spawn lorien warriors. For an example I will give you the Elven Barracks CommandSet:

    CommandSet ERElvenBarracksCommandSet
    1 = Command_ConstructElvenLorienWarriorHorde
    3 = Command_PurchaseUpgradeElvenBarracksLevel2
    2 = Command_Sell
    End

    CommandSet ElvenBarracksCommandSetLevel2
    1 = Command_ConstructElvenLorienWarriorHorde
    3 = Command_PurchaseUpgradeElvenBarracksLevel3
    2 = Command_Sell
    End

    CommandSet ElvenBarracksCommandSetLevel3
    1 = Command_ConstructElvenLorienWarriorHorde
    2 = Command_Sell
    End

    1. Constructs Elven warriors.
    2. Upgrade barracks (Except level 3)
    3. Demolish building. (Palantir only)

    Now you may be thinking two things 1.Why does this CommandSet only tell the barracks to spawn one kind of elves?
    Because this is the example I am using.
    2.Why are the numbers listed in the wrong order?
    Because the second line on in the code changes.

    Or you could have Aragornís commansSet:


    CommandSet GondorAragornCommandSet
    1= Command_ToggleStance
    2= Command_SpecialAbilityBladeMaster
    12 = Command_CaptureBuilding
    13 = Command_AttackMove
    14 = Command_Stop
    16 = Command_SetStanceBattle
    17 = Command_SetStanceAggressive
    18 = Command_SetStanceHoldGround
    End

    1. Opens the toggle stance buttons
    2. Blade master power
    12. Lets Aragorn capture ins, outposts, shipwrights and signal fires. (Not in palantir)
    13. Aragorn will move to a location but kill any enemy units on the way. (Not in palantir)
    14. Stops Aragorn moving to a location or attacking. (Not in palantir)
    15. Default stance. (Opens from stance button)
    16. Aggressive stance. (Opens from stance button)
    17. Hold ground stance. (Opens from stance button)

    Now these are the CommandSets, but what will give it to the object the CommandSet was designed for. Ah yes. I will only use Aragornís CommandSet. So now we go into Aragorn.ini and look for the code:

    CommandSet = GondorAragornCommandSet
    End

    NOTE: The CommandSet must be the name of Aragornís CommandSet

    Well I think we have covered enough now you give it ago. E mail me, and tell me if you learnt anything, if there is anything wrong with the guide.


    SpellBookEditing

    Currently beeing written.


    World Builder & Game Mods



    |73/-\73| Sign up toAlex_7373BfmeForums ClickHere |73/-\73|
    Want to learn ini? Page1 Page2 Page3

    [This message has been edited by Alex_7373 (edited 04-26-2007 @ 03:30 PM).]

  • « Previous Page  1 2 3 4 5 ··· 7  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Battle for Middle Earth II Heaven | HeavenGames