Raised This Month: $51 Target: $400
 12% 

Keyvalues #base <sourcefile>


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-02-2016 , 19:01   Keyvalues #base <sourcefile>
Reply With Quote #1

Hey, I found this keyname "#base" from Insurgency game, haven't seen before. (name "#include" exist also, works same way ?)

It can merge source file(s) in your current kv structure.
It not update/overwrite your current values, but create new ones.

Quick example:
By creating three file in game root folder

Main File.txt

First File.txt

Second File.txt


And in your sourcemod plugin, you import Main File.txt in your KeyValue structure and thats it.
PHP Code:
    Handle kv CreateKeyValues("MyFile");
    
FileToKeyValues(kv"Main File.txt");
    
KeyValuesToFile(kv"MyFile.txt");
    
CloseHandle(kv); 
Output will be this:
Code:
"Main File"
{
	"Main File section"
	{
		"Main File key"		"value"
		"First File key"		"666"
	}
	"Second File section"
	{
		"Second File key"		"value"
	}
}
__________________
Do not Private Message @me

Last edited by Bacardi; 03-08-2022 at 13:18.
Bacardi is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-02-2016 , 22:51   Re: Keyvalues #base <sourcefile>
Reply With Quote #2

Cool! Nice find
headline is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode