The Daily Click ::. Forums ::. Klik Coding Help ::. INI++ help.
 

Post Reply  Post Oekaki 
 

Posted By Message

pallokallo



Registered
  23/07/2009
Points
  7
25th July, 2009 at 01:31:46 -

Its me again with my problems..

Is it possible to make ini++ write modified string to config

normally ini++ makes it like this:
[player]
name=pallokallo

but i need it to make it:
//player
name pallokallo

If ini cant do it is there extension that can edit text files and replace
given values. For like i want to replace [ with // or = with empty space.

 
-<s-

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
25th July, 2009 at 05:26:18 -

Well first things first, if you're using MMF, than just use the normal INI extension. INI++ isn't that good anymore.

 
http://www.facebook.com/truediamondgame

pallokallo



Registered
  23/07/2009
Points
  7
25th July, 2009 at 07:44:58 -

Yes I have MMF2.. So you can make ini to write custom strings?

Edited by pallokallo

 
-<s-

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
25th July, 2009 at 08:27:18 -

I don't know any right off the top of my head. I'm not sure why you'd need it though. The only point I can see for editing files like that would be for saving information to be retrieved. That's exactly what INI does.

 
http://www.facebook.com/truediamondgame

pallokallo



Registered
  23/07/2009
Points
  7
25th July, 2009 at 09:33:47 -

Problem is that Quake 2 cant read name=pallokallo only name pallokallo with 'space'

 
-<s-

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
25th July, 2009 at 14:22:07 -

You could make your own data storing system with the "DataGrid" object, saving and loading as ascii files. It would basicly be a 2D array, but not crypted and with a layout wich is easy to manually edit, just like an ini file.

Make a two colums array, the first beeing the item name, the second the value/string and use a space (" ") as the delimiter. It will give you exactly what you need.
That is if you have MMF2 dev, since the DataGrid object is a dev exclusive.

 
...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
25th July, 2009 at 14:35:00 -

Or you could always use a plain old text editor that saves the txt with an .ini suffix!

 

  		
  		

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
25th July, 2009 at 14:45:36 -


Originally Posted by OldManClayton
Or you could always use a plain old text editor that saves the txt with an .ini suffix!



He probably wants the ini file to be edited by his MMF app. Otherwise, he probably wouldn't have botthered asking.


 
...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
25th July, 2009 at 14:51:45 -

Yes, I know. You can edit txt files from within MMF. Set it off-screen and use string functions and the line find thingamabob to manipulate it.

 

  		
  		

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
25th July, 2009 at 17:15:33 -

I know how to manipulate strings, but how would you load a txt file in MMF if it isn't organized for an extension to understand it?

I've been searching a way to do that for a while, but every data storing extensions I've tried all have their own fixed delimiters and way to parse data. I'd like to be able to load any type of file as one big string in MMF, but I haven't found a way yet. Would there be one?

 
...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
25th July, 2009 at 17:37:02 -

You should take a look at the Get Line extension. I don't know if it's versatile enough for what you need it for, but it can select lines in txt files.

 

  		
  		

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
25th July, 2009 at 18:10:43 -

Thanks
But I've got no idea on how to use a .cox MMF1.5 extension.
In what folder should I put the file in and will it normaly appears in the object list?

 
...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
25th July, 2009 at 18:39:11 -

O_o There should be an MMF2 version, because you can't use MMF1.5 extensions and I've got it in my object list...

 

  		
  		

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
25th July, 2009 at 20:04:36 -

Found it.
Too bad the file needs to have at least one line break. It also seems that, if a line is too long, it will ignore it and the followings. That means it'll work with files such as pdf, but not with gif, mp3 and such "big chunk of text" files. I'll Still find many uses for it, so thank you very much:


 
...

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
26th July, 2009 at 13:32:58 -

Maybe you could have them save/load in your own extension or as .ini and then have an export option for building the Quake save? Though, this adds an inconvenience of having two files for the one save you want to make.. perhaps with a great deal of string parsing it's possible. But I know absolutely nothing about string parsing.

 
n/a

pallokallo



Registered
  23/07/2009
Points
  7
26th July, 2009 at 17:39:20 -

Hi again.

I made something but.. I think there is easier way to make it work.. Just need
Something that can get/add information to custom string from the .cfg file
so i dont need ini file at all. DataGrid looks promising though.

Here it is basic key binding page i made.
http://pallokallo.frametic.fi/files/gloom_test.7z

outputs strings to .cfg file like this

//Movement
bind w +forward
bind s +back
bind a +moveleft
bind d +moveright
bind CTRL +speed
bind SHIFT +movedown

//Action
bind MOUSE1 +attack
bind e +use
bind q reload
bind r use special
bind MWHEELUP weapnext
bind MWHEELDOWN weapprev
bind f flashlight
bind g grenade

//Misc
bind [ +invnext
bind b invprev
bind TAB invuse
bind ] changeteam
bind ENTER cmd upgrades
bind v destroy

Edited by pallokallo

 
-<s-

Sumo148

Super amazing fantastic user

Registered
  26/01/2009
Points
  530

360 OwnerThe Cake is a LieVIP MemberPokemon Ball!I am an April FoolI donated an open source projectSanta Hat
1st August, 2009 at 16:04:12 -

the "binding" code reminds me of the portal console and "binding" keys to commands...I should add that in my game

 
n/a
   

Post Reply



 



Advertisement

Worth A Click